Skip to content

Documentation for fast debugging#74

Merged
pfitzseb merged 2 commits intojulia-vscode:masterfrom
MariusDrulea:master
Aug 29, 2023
Merged

Documentation for fast debugging#74
pfitzseb merged 2 commits intojulia-vscode:masterfrom
MariusDrulea:master

Conversation

@MariusDrulea
Copy link
Copy Markdown
Contributor

The following options are described, together with an example.

  1. ALL_MODULES_EXCEPT_MAIN
  2. The use of custom sys images with the debugger.

### `ALL_MODULES_EXCEPT_MAIN`
In order to make the debugger run faster we want to minimize the number of packages/modules which are interpreted.
Let's say you need to debug the code you wrote, but also the functionality provided by the package Statistics.
Click on the Debugger Default Compiled extension setting.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth noting that there is also a bit of UI for this, maybe?

Copy link
Copy Markdown
Contributor Author

@MariusDrulea MariusDrulea Aug 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. However, ALL_MODULES_EXCEPT_MAIN is something to be set in the settings.json I think, before doing any debugging, I don't know other way to do it.

If we use ALL_MODULES_EXCEPT_MAIN, no other symbols appear to be loaded in the "All" list such that the user can further add other modules from the UI.

image

Copy link
Copy Markdown
Contributor Author

@MariusDrulea MariusDrulea Aug 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, if you debug one more time, all desired symbols appears in the "All" list. But these are expected to appear as compiled instead of interpreted, right?
image


If you make one of the modules in the "All" list to be "compiled", the "All" list dissapears. Looks like a little bug here. In addition, this operation is very slow.

image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a few more tests I noticed I can do the following: add ALL_MODULES_EXCEPT_MAIN from UI.
image

But now If I want to remove the Statistics, I just cannot do it. One workaround was to add it as compiled (again?), and then remove it, but this just doesn't work from the UI:
image

Result after removing Statistics from the UI, hoping it will become interpreted. Unfortunately, this did not work:
image

Copy link
Copy Markdown
Contributor Author

@MariusDrulea MariusDrulea Aug 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pfitzseb while I have managed to add ALL_MODULES_EXCEPT_MAIN from the UI, I have found the UI option quite unreliable, see the above issues with the Statistics and the "All" list not expanding properly etc.
Additionally, you don't want to get the GLMakie in the interpreted mode, not even a single time. Currently, I think it's best to add ALL_MODULES_EXCEPT_MAIN directly in the settings.json such that expensive packages will get compiled from the very first time.

Here I see 2 options:

    • a) Fix the behavior of "All" such that "Statistics" can be marked as interpreted from the UI.
    • b) This PR will wait for the a) fix.
  1. Accept the PR as it is and update this section after the identified fixes are done. A follow up PR will be needed.

What do you think?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll just merge the PR :) Thanks again!

@MariusDrulea
Copy link
Copy Markdown
Contributor Author

Can we trigger a release such that this debugging doc shows in "stable"? Currently it's only visible in "dev".

@pfitzseb
Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants