Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Error stack is not sourcemapped #212

Closed
AskYous opened this issue Jun 13, 2017 · 9 comments
Closed

Error stack is not sourcemapped #212

AskYous opened this issue Jun 13, 2017 · 9 comments

Comments

@AskYous
Copy link

AskYous commented Jun 13, 2017

I am receiving an error from VSCode saying it cannot find the file when I click on the source of an error in chrome from the VSCode debug console. I am running Debugger for Chrome version 3.1.2. I posted a screenshot below. Notice a couple of things:

  1. My website is running on localhost:1337. For some reason, VSCode is trying to open the file in /1337/js/components.js. (How did the port get into the source path???)
  2. I have source mapping on for my typescript files.
  3. The file open is the launch.json file shown in the screenshot. I pointed the webRoot folder to my assets folder, yet it seems to completely ignore it.

image

Update: I ran this with "trace": true. Here is vscode-chrome-debug.txt.

@AskYous
Copy link
Author

AskYous commented Jun 13, 2017

It might have something to do with angular. The error that Chrome threw was from an angular component controller.

@roblourens
Copy link
Member

That error probably showed up when you clicked on the path in the console, right? That's just from the fact that we look for paths very optimistically, and don't support URLs.

But it is a problem that the urls aren't being mapped, since it seems like everything is set up correctly...

@AskYous
Copy link
Author

AskYous commented Jun 13, 2017

Yes. It happened when I clicked on the path in the console.

@roblourens
Copy link
Member

Can you hit breakpoints in those files?

@AskYous
Copy link
Author

AskYous commented Jun 13, 2017

@roblourens yeah they work just fine. Due to my inability to click on the error location from the command line, I just place a breakpoint in the file that threw the error. Then I click continue from the debugger and tell VSCode to break at the next exception. That's how I find the next exception location that VSCode was trying to map to.

@roblourens
Copy link
Member

Is the project on github for me to try? Can you share it?

@AskYous
Copy link
Author

AskYous commented Jun 13, 2017

Unfortunately it's private. Let me try to create another project that would produce this error. In the meantime, I have a bit more information that I recorded and put on YouTube. Take a look: https://www.youtube.com/watch?v=Nht4eB2jTzY.

@AskYous
Copy link
Author

AskYous commented Jun 13, 2017

@roblourens Ok, I reproduced the issue using a simple project. I created a repository here with instructions on how to reproduce this error: https://github.com/AskYous/chrome-debug-bug.

@roblourens roblourens changed the title Unable to open 'components.js': File not found (c:\Users\<my-user-name>\Documents\GitHub\<my-project>\1337\js\components.js). Error stack is not sourcemapped Jun 22, 2017
@roblourens
Copy link
Member

Sorry it took so long to get to this. It's just an obvious mistake in hindsight.

@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants