Is it possible to get debug/intermediate output from plantuml?

0 votes
asked Aug 9, 2022 in Question / help by anonymous
I have a 2 puml files "A" and "B" - B "!include"s A.

"A" has this procedure:

!procedure $ask($source, $destination, $message, $response, $method)
  $source -[#red, dotted]-> $destination: $message\n <font color=blue> $response\n <font color=red>$method
!endprocedure

"B" calls it like so:

$ask(SLM, SA, "SomeRequest", "SomeResponse", "SomeMethod")

("SLM" and "SA" are defined as participants in "A")

For this one call, nothing shows up in my diagram - the rest of the diagram appears as normal (there are no errors shown, and there are no other calls to this procedure).

Other things defined in "A" show as expected (including other similar procedures), so the include is working.

How can I generate some kind of debug output or intermediate file so that I can attempt to understand what is happening with this one procedure call?

Thanks for any help...

1 Answer

0 votes
answered Aug 10, 2022 by The-Lu (64,340 points)

Hello A.,

Yes: 

  • You can use:`-preproc` on the command line option;
  •  But in your case: Just suppress `, dotted` on your procedure, as:
!procedure $ask($source, $destination, $message, $response, $method)
  $source -[#red]-> $destination: $message\n <font color=blue> $response\n <font color=red>$method
!endprocedure

The dotted arrow is already done with `-->`.

Enjoy.
Regards.

commented Aug 10, 2022 by anonymous
Thanks much.  The "-preproc" helps, and does show that nothing is generated from that procedure call.  I just don't know *why*.  I did take out the ", dotted", but no difference.

I created a set of small test files to try to show the issue, but they work as expected, so it's something in my original file causing it, I guess.  Odd one.  I guess I'll strip stuff out of my original files until it works, or just do a workaround of not using the included procedure (which worked fine).

Thanks again.
commented Aug 10, 2022 by anonymous
Interestingly, if I just repeat the procedure call, it appears in the resulting diagram (just once, even though it's listed twice).  Not sure what's going on.  Tried taking a bunch of the surrounding stuff out - no change.  Just wish I could tell what was happening when it originally parses that call....
commented Aug 11, 2022 by The-Lu (64,340 points)
Hello A.,

Interesting...
A minimal example will be welcome.
If You find it...

Regards.
commented Aug 11, 2022 by anonymous
That was the problem - I tried to make a minimal example, and everything worked as expected - I couldn't reproduce it that way.  When I removed more of the original file, it eventually behaved as expected.  My best guess is that it was being considered a continuation of a comment that preceded it.  Not sure why that would have happened, but c'est la vie.

At any rate "-preproc" was helpful - thanks much!
...