Comments (13)
This happens for me. Detaching a debugger during a breakpoint pause causes the extension to hang.
from vscode.
I am going to release the rewritten debugger this week anyway. The only thing that doesn't work is "Restart" button, but you can always detach and start a new debug session.
I specifically asked @connor4312 because he was working on the JS debugger in vscode and maybe has some insights on this specific problem, but it doesn't block release. The only thing that was blocking release was Vitest 1.5.0 which I published yesterday.
from vscode.
do you know if it's possible to do an action before the debugger attaches itself when "Restart" button is clicked?
Playwright asked about the same thing for the same scenario in their tests. I think I started working on a branch locally at one point but never finished it... tracked here microsoft/vscode#210304
from vscode.
Which version of the extension are you using?
from vscode.
This no longer happens for me.
from vscode.
The debugger works great now with #334, but we have a problem with "Restart" button.
@connor4312 do you know if it's possible to do an action before the debugger attaches itself when "Restart" button is clicked? I need to stop the previous inspector session before the new one attaches, and I wasn't able to find a solution using pwa-node:attach
. I found a hidden preRestartTask
option, but it's called too late - the new debug session is already attached by the time it's called.
I am experimenting in this PR: #334
You can reproduce this behavior like this:
- Clone repo, install dependencies, run
pnpm run compile
- In the debug section click on "Run Extension Basic Example"
- Put "debugger" statement somewhere in
add.test.ts
file - Click on debug icon for "add.test.ts" test item
- Click on "Restart" - this will close the debugger because the inspector is closed after the session reattaches itself - in this situation, I want to wait until the test has finished running, and then attach the new session
If someone can help me out here, that would be great. If something needs to be done on Vitest's side for this to work, this is also fine.
from vscode.
For me to be able to look at this a bit maybe over the weekend, I need to understand: How did this work before the rewrite of the extension, and why? Or maybe it didn't?
from vscode.
For me to be able to look at this a bit maybe over the weekend, I need to understand: How did this work before the rewrite of the extension, and why? Or maybe it didn't?
Before the rewrite, the extension was using pwa-node:launch
debug configuration to spawn a new Vitest process. We now have an integration in Vitest to open an inspector in the process where the test is running.
from vscode.
And the original issue description, is that for the new extension or the old, released version?
from vscode.
And the original issue description, is that for the new extension or the old, released version?
The original issue is about the pre-release version as you can see in the screenshot tests are rendered as a test tree which was not supported in the 0.4.0 (they were rendered as a list).
from vscode.
And the original issue description, is that for the new extension or the old, released version?
The original issue is about the pre-release version as you can see in the screenshot tests are rendered as a test tree which was not supported in the 0.4.0 (they were rendered as a list).
Aha.
I can't help but think we should maybe (for now, temporarily) make the debug functionality as it was in the old version (if possible).
Just to get to feature completion and get all of this unrealized great value out.
And then get the new method fixed afterwards.
What are your thoughts on this?
from vscode.
Ah that's awesome! π
from vscode.
do you know if it's possible to do an action before the debugger attaches itself when "Restart" button is clicked?
Playwright asked about the same thing for the same scenario in their tests. I think I started working on a branch locally at one point but never finished it... tracked here microsoft/vscode#210304
Thank you for looking into this ππ»
from vscode.
Related Issues (20)
- Plugin needs an option to select a shell environment
- Coverage : Change color of line partially covered HOT 2
- Vitest v1.2.0 is not supported. Vitest v1.4.0 or newer is required. HOT 3
- `envalid` erroring out when continuous run is enabled and on first re-run
- Tests executing child_process not working inside extension
- Failed to get Node.js version HOT 6
- Always displaying vitest error on startup HOT 2
- Crash at startup on Windows when using Yarn PnP
- vitest plugin keeps a file lock on rollup and esbuild which halts package upgrades at times HOT 6
- CanΒ΄t modify directory tree HOT 1
- Vitest fails to start if a compiled config is available
- No test output when debugging HOT 7
- Vitest failes to start in vscode >=1.90 when using Yarn PnP HOT 1
- Open VSX Registry (VSCodium) forcing outdated version (1.0.0-beta.X) HOT 7
- Vitest failed to start error on .d.ts files with v0.12.4
- Vitest process exited with exit code null HOT 2
- Color indicator of failing tests in Explorer and Tab Bar
- Debugger grinds to a halt with large unrelated files present HOT 1
- Debugging test regression after 0.10.7 HOT 3
- Error: Cannot find module @rollup/rollup-darwin-x64 on MAC with M3 processor HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode.