Immediate/debug window

Is there any way to test some xojo code without running the project?
a bit like it was done with visual basic in which there was a window called “immediate” which allowed you to execute arbitrary code even without having launched the project, or it allowed you to pause the application, change the value of variables on the fly and then do restart the application.
Unfortunately, to understand if the code has problems, I haven’t found a way other than to launch the project, which in projects with a lot of code (especially the web) takes a long time … and trying even portions of code becomes tedious and long.
Has anyone found a way to do as it was done with the old vb of which I am attaching a photo …

Immediate mode was talked about /asked for by users coming from VB many years ago, but never implemented/ optioned.

:weary: :weary:

Consider that to implement an “immediate window”, the code would have to be interpreted instead of compiled. Depending on what you want to do, you MAY be able to use XojoScript. But for all serious usages, it really has to be compiled.

If you are only testing some little thing, consider a small throw away project which has just the stuff you want to test. That will take very little time to launch in the debugger.

You can test for compilation errors with Project > Analyze [Project / Item]

Whenever I want to just try something out, I open a new project and put the code in the default window’s open event, then run it in the debugger a walk through it. Makes it quick and easy.


yes of course this is a possibility that has however enormous limits

  1. you cannot refer to objects or classes that you have in the main project

  2. you can’t interact with the execution state of the main project code and therefore you can’t change the values ​​of the variables on the fly

anyway thanks everyone (it’s a pity there isn’t something similar to vb’s old “immediate” window)