Git Product home page Git Product logo

Comments (13)

sheremet-va avatar sheremet-va commented on July 17, 2024 3

This happens for me. Detaching a debugger during a breakpoint pause causes the extension to hang.

from vscode.

sheremet-va avatar sheremet-va commented on July 17, 2024 2

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.

connor4312 avatar connor4312 commented on July 17, 2024 1

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.

ffMathy avatar ffMathy commented on July 17, 2024

Which version of the extension are you using?

from vscode.

ffMathy avatar ffMathy commented on July 17, 2024

This no longer happens for me.

from vscode.

sheremet-va avatar sheremet-va commented on July 17, 2024

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:

  1. Clone repo, install dependencies, run pnpm run compile
  2. In the debug section click on "Run Extension Basic Example"
  3. Put "debugger" statement somewhere in add.test.ts file
  4. Click on debug icon for "add.test.ts" test item
  5. 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.

ffMathy avatar ffMathy commented on July 17, 2024

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.

sheremet-va avatar sheremet-va commented on July 17, 2024

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.

ffMathy avatar ffMathy commented on July 17, 2024

And the original issue description, is that for the new extension or the old, released version?

from vscode.

sheremet-va avatar sheremet-va commented on July 17, 2024

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.

ffMathy avatar ffMathy commented on July 17, 2024

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.

ffMathy avatar ffMathy commented on July 17, 2024

Ah that's awesome! 😍

from vscode.

sheremet-va avatar sheremet-va commented on July 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.