Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not add breakpoints #191

Open
whp98 opened this issue Jun 27, 2023 · 12 comments
Open

can not add breakpoints #191

whp98 opened this issue Jun 27, 2023 · 12 comments
Assignees
Labels
bug Something isn't working released

Comments

@whp98
Copy link

whp98 commented Jun 27, 2023

Description of the bug

How would you shortly summarise the issue?

i add a breakpoints to app.js , but vscode say can not add some breakpoints

image

To Reproduce

What steps did you perform which led to this issue?

  1. i start a expo app and add a breakpoint

image

  1. my launch.json
{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "expo",
      "request": "attach",
      "name": "Debug Expo app",
      "projectRoot": "${workspaceFolder}",
      "bundlerPort": "19000",
      "bundlerHost": "127.0.0.1",
      "enableTurboSourcemaps": true
    }

  ]
}

3.vscode Code Doctor show wrong code path
image

image

  1. debugger can attach to the android emulater but my breakpoint not work
  2. i can only use the ctrl + j use chrome to debug

Expected behavior

i can add breakpoint in vscode and debug the app

Actual behavior

not working

Additional context

Can you further explain the issue? E.g., information about version/environment or screenshots.

@byCedric byCedric self-assigned this Jun 30, 2023
@byCedric
Copy link
Member

byCedric commented Jul 1, 2023

Thanks for reporting the issue! Seems like the capitalization in the drive name throws vscode off. I'll make sure to test this a bit more on Windows.

Just out of curiosity, which one is the correct one? Is your E: drive capitalized or lower case (e:)?

@whp98
Copy link
Author

whp98 commented Jul 6, 2023

WINDOWS system path does not distinguish between uppercase and lowercase

The problem I'm having is that my code path seems to be repeated twice, and the directory doesn't even exist

The part on my screenshot framed in red is correct

@AxelKlemm
Copy link

AxelKlemm commented Aug 17, 2023

Got the same problem. When trying to set a breakpoint it can't find the location. VS Code reports file location as workspacefolder+fullsourcefilepath - the full path of course already containing the workspace root, just like in @whp98 screenshot above.

On win11, node 20.5

@byCedric
Copy link
Member

Thanks for the additional information. It seems that this issue might actually be caused by the sourcemap path generation or the vscode path mixing. I'll try to investigate on a Windows machine on my end.

@byCedric
Copy link
Member

byCedric commented Sep 3, 2023

@byCedric
Copy link
Member

byCedric commented Sep 4, 2023

I just published a pre-release with a potential fix included. You can switch to this version through VS Code, more info here.

Please try version 1.2.1 and let me know if this fixes the issue for you.

@AxelKlemm
Copy link

I just published a pre-release with a potential fix included. You can switch to this version through VS Code, more info here.

Please try version 1.2.1 and let me know if this fixes the issue for you.

Just tried with the 1.2.1 pre-release, unfortunately still getting the same errors...

image

When the debugger attaches massive dump of path mismatches for the sourcemaps:
image

And when you try to set a breakpoint:
image

Hope this helps a little, thanks for your efforts trying to fix this!

@orefors
Copy link

orefors commented Oct 15, 2023

I'm still having this exact problem with v 1.2.1 on Windows, any progress on a fix (or work around)?

@CryptoSodi
Copy link

It has been months and this issue is still not fixed is it even possible to debug in vscode with expo

@CryptoSodi
Copy link

For anyone on Windows trying to work around this. It appears that it is related to project files not being located on the same drive as the VS Code installation. For me it worked to move the project files to the same drive as the VS Code installation.

don't know why this is not mentioned anywhere this is kind of stupid tbh

@wchbrad
Copy link

wchbrad commented Feb 5, 2024

same issue,someone help?

@d3vpunk
Copy link

d3vpunk commented May 3, 2024

same here
seems the selected breakpoints in dev tools are not matching with the actual line the debugger is stopping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants