Globals items stay empty and added references cannot be found

Best Team Alternet,

I have created a new project that is based of the “Debugger Integration” demo.
The demo shows how to debug a script by opening a whole project, I have modified the Demo so that it only opens a single file and than I would debug that file. Besides that I’ve also added GlobalsItems and references to the Scriptrun and registered the code to the DebugCodeEdit.

The whole debugging part is working, now I can find the GlobalsItems in the script but for some reason they are always null. Also the references that I have added can not be found.

I have added a sample project, I hope I have added enough information.

Project sample

Hi,

The main problem with debugging script, is that debugger and debugee need to be two separate processes (this is the case for C#/Visual Basic, our Python/IronPython and TypeScript debuggers do not have such limitations).

You may read a bit more about this issue here:

When you just execute script (using Run without debug), it can load generated assembly into the application domain and set fields of ScriptGlobalClass. In case of debugging, it runs this assembly as standalone application and attaches debugger to it.

In case you need to pass relatively simple object to the script (say array of string), you may just pass it via command line arguments to that script executable; otherwise you would need to employ interposes communication techniques - please take a look at DebugRemoteScript example to see how it can be implemented.

Kind regards,
Dmitry

1 Like