Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
section for all modules except main
  • Loading branch information
MariusDrulea authored and MariusDruleaRB committed Jul 29, 2023
commit 245949f868a05bae8c298b7cae9aba74c66c290e
Binary file added docs/src/assets/debugger/16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/debugger/17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions docs/src/userguide/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,17 @@ Your code will run a lot faster with this option enabled.

### Troubleshooting
If you encounter any issue when using the debugger, Please do let us know about it over at the [Julia VS Code](https://github.com/julia-vscode/julia-vscode) repository.


## Settings to speed-up 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!


![Debugger](../assets/debugger/16.png)

Configure this setting as in the picture bellow.
`ALL_MODULES_EXCEPT_MAIN` will make everything run in compiled mode except for Main. We also use "-Statistics." to remove this package from the list of compiled modules, such that it will be interpreted.

![Debugger](../assets/debugger/17.png)