Debugging multiple modules

I'm getting really confused about how to debug multiple modules at once.

Normally I would do:

Espace3 > Espace2

Espace2 > Espace1

I even tried:

Espace1 > Espace2

Espace2 > Espace3

But right now it's not working. I published everything to remove the warnings from the modules but still not working. It's not the first time it is having this behaviour. I kinda getting the feeling that it the debugging mechanic is unstable.

Can someone explain me what is happening?


EDIT:

Espace1 and Espace2 are working, but Espace3 breakpoints are not. Espace3 is a service but the breakpoint is on a server action. Does that matter?

mvp_badge
MVP
Solution

Hi Bo,

You hit a very common problem with debugging producers of producers. Like Bas wrote above, you need to set the Entry Module to the top level consumer, but quite often, you can't select it from the list. What you can do, just for debugging, is reference some element from the producer of the producer, in the top module. So if you have:

consumer <- producer 1 <- producer 2

and producer 2 doesn't allow selecting consumer, reference something from producer 2 in consumer. That will make consumer selectable in the dropdown in producer 2.

Hello, I have the same problem.

Can you go and check on the Espace3 if there is on the dropdown the modules to where you want to debug?


Kind regards,

Márcio C.

Hi Bo and Marcio,


When debugging, you always have to set the entry module where te requests originally came from. 


So in your case if you want to debug module 1, module 2 and module 3, you have to start the debugger three times.


Module 1: Entry module (this module)

Module 2: Entry module (module 1)

Module 3: Entry module (module 1)


That should do the trick. 


Good luck!

Thanks!! Right now i don't have problems with referenced modules, I just have problems when I am using APIs and I want to debug an API! Sometimes it seems like magic when starts to work :d .

Thanks. It was more than I said :)

Regards,

Márcio C.

mvp_badge
MVP

Hi Marcio,

REST requests run in a thread of their own, so when debugging an exposed REST API, always set the Entry Module to "this module".

Not sure how experienced you are, so forgive me if i state the obvious:

You need to know from where the action is started. this is not necessairly the screen where you click from. If there is a bpt process or a service action somewhere in the flow, this is where you need to start your debug module from.


I also had problems where the debugger just wouldn't hook into the browsers actions. i found this helped:


If these are not helpful, could you please add some screenshots of what you are trying to do?

Bas, Thanks for the information. In my case I couldn't connect module3 with module1. I could only select module2 in the dropdown of module3


Stefano, Also thanks for your information. I knew it would depend on where your call started. But that shouldn't be the problem for me. Because my entry point is the first button on my screen which is in module1. The action of the button calls a server action in the same module (module1). That server action will call another server action in module2 and module2 calls a server action in module3. module3 calls a REST call. I've put my breakpoint directly onto that call to the REST call in module3. Module3 hits the REST call, gives output of the REST call but won't hit the breakpoint. So I would say that the entry point is in this case at the front page and I should use it the way Bas described it. But I guess I am wrong because it is not working haha.


mvp_badge
MVP
Solution

Hi Bo,

You hit a very common problem with debugging producers of producers. Like Bas wrote above, you need to set the Entry Module to the top level consumer, but quite often, you can't select it from the list. What you can do, just for debugging, is reference some element from the producer of the producer, in the top module. So if you have:

consumer <- producer 1 <- producer 2

and producer 2 doesn't allow selecting consumer, reference something from producer 2 in consumer. That will make consumer selectable in the dropdown in producer 2.

Hi Kilian,

Thanks for your response and for the workaround! It worked for me! :)

mvp_badge
MVP

Yup, it works. The reasons for all of this is twofold:

  • You need to set the top-level consumer in all producers you want to debug, because all producers' DLLs are copied (or rather, linked) to a directory inside the consumer, in IIS;
  • Service Studio looks in the metadata (in the database) for all consumers of a Module, but only includes direct consumers, not consumers of consumers. So you need to make the top-level consumer a direct consumer of every Module you want to debug.

Happy coding (and debugging :))!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.