Debug behavior and generator with breakpoints

There is the possibility to set breakpoints in behavior methods as well as in generator templates. But I haven't found out how to use them. It would be great if I could step through statements of the generation process. Do I have miss this feature or is it not possible (yet)?
7 comments
To be able to stop on these breakpoints you have to create run configuration and execute one more instance of MPS:

runMPS.png
0
Hello Alex,
Thank you for digging in old threads and answering them!! This information here is very useful for me! Printf debugging is definitely the hell...
But I really don't understand why there is a new MPS instance necessary.

I will have a closer look to your other answers in the next days.
0
Another MPS instance is essential here. Imagine you stop currently running java process (MPS while evaluating behaviour method or during the generation process) on a breakpoint - all threads should be stopped, so it's not possible to interact with this process anymore (UI events should be processed in one of the running threads, but all threads are stopped). In the same time you'd like to have debugger functionality running there. This means some threads should alive, run & modify the state of the process you are currently debugging...
0
Yes of course, this makes sense. But I'm surprised, that my generator runs in the same process as my IDE when I'm designing a language with its generator. Then the classes of my generator must be reloaded every build anyway.
I think this is also the reason why I must rebuild the generator to apply changes in it. Mostly a make doesn't help here. This is a bit annoying.
0
BTW: If I debug with another MPS instance I must open the project in both instances since the sandbox and the generator is in the same project. But where do I should change my generator if I've found the error? Do I need to restart the second instance afterwards?
0
The language is loaded/reloaded into a current MPS instance on building/rebuilding it. It's not possible (or we were not able to develop the way) to debug it in-place. Make should work. If it's not working you can try filing request with the sept to reproduce it (if possible).
0
Yes. You have to restart "second" instance.
0

Please sign in to leave a comment.