Closed gbraven-dev closed 1 month ago
Hmmm... if I understand your use case correctly, you were trying to debug from the TestExplorer's tree, right? This error indicated you were trying to debug from a workspace root, it seems, which should not be debuggable - only the test-file, test/describe blocks are debuggable.
Do you have a sample repo so we can take a closer took?
I apologize but I do not have a repository I can share.
From the vscode testing explorer tree (panel labeled "Testing" that pops open when you click on the testing extension shortcut) at the top there are 3 exposed buttons: Run Tests, Debug Tests, Show Output.
Run Tests --> All of my tests are successfully run Debug Tests --> Get error mentioned in issue report shown in Terminal
If I expand the tree and navigate to an individual test file or to an individual test in that file and click its debug button it works.
If I launch the debug configuration configured for Jest from the main debug panel it works.
If I click on the interactive button overlays displayed when I open a test file in the an editor debugging works.
Just that top level "Debug Tests" fails.
Clearly not a showstopper of any kind for me. Just thought I would report in case it needs fixing.
I see, thanks for bringing it to our attention. This is the intended behavior though, maybe the message can be improved.
To debug from the root item means to run all tests for otherwise a single test block debugging, i.e. not very efficient. Therefore we disabled the root/directory level debugging, to encourage the adoption of more efficient debug runs.
Dose that make sense?
Understood. User could choose to run all tests in debug mode for an explicit reason...so maybe letting user determine efficiency is optimal. For current implementation would just say the button should probably be disabled for clarity and would find a way to keep the error message from being generated so it doesn't cause confusion. Although these are very low severity/priority.
That's true, we should either enable and support debug for all situations, or disable the button altogether.
That's true, we should either enable and support debug for all situations, or disable the button altogether.
+1
Debugging can be initiated from the vscode debug panel using the vscode-jest launch configuration and can also be initiated from the inline markup in the test files but the extension's own navigation panel fails to initiate debugging with the error "item orta.vscode-jest: [project] is not debuggable". This error did not occur on this project when the extension was first installed.
Environment
vscode-jest version
: 6.0.1node -v
: 18.17.1npm -v
oryarn --version
: 9.6.7npm ls jest
ornpm ls react-scripts
(if you haven’t ejected): 29.6.2Prerequisite
npm run test
ornode_modules/.bin/jest
) [fill]Steps to Reproduce
[fill]
Relevant Debug Info
[fill]
Expected Behavior
[fill]
Actual Behavior
[fill]
The fastest (and the most fun) way to resolve the issue is to submit a pull-request yourself. If you are interested, feel free to check out the contribution guide, we look forward to seeing your PR...