You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behavior:
When creating a plugin the generated paths for the plugin source files in app-bundle.js.mapsources array have duplicated directories e.g.
This causes breakpoints set in VS Code to be missed. Breakpoints set in Chrome dev tools will still work though.
What is the expected behavior?
Source paths should be correct e.g. "sources":["../src/attributes/color.ts", ...] and VS Code will then hit breakpoints.
Repro Steps
Create a plugin with example content au new sad-vscode -u -s typescript,vscode,plugin-scaffold-basic -p
au run
Set breakpoint in one of the plugin source files
Start debugging, the breakpoint will not be hit
Sourcemap file has the wrong source paths
Fix Suggestion
I don't really have the time to test this properly but this fixes the scaffolded plugin. I don't know if it impacts the standard app or how it behaves with deeper/more complex directory structures.
The source map is all messed up in normal app project too. The existing code does not work for local source, it should only apply to dependency sources (npm packages).
I'm submitting a bug report
1.0.0
Please tell us about your environment:
Operating System:
Windows 10
Node Version:
12.3.1
6.9.0
Browser:
Chrome
Language:
TypeScript 3.5.1
Loader/bundler:
RequireJS
Current behavior:
When creating a plugin the generated paths for the plugin source files in
app-bundle.js.map
sources
array have duplicated directories e.g."sources":["../src/attributes/attributes/color.ts","../src/binding-behaviors/binding-behaviors/primary-click.ts","../src/elements/elements/hello-world.ts","../src/elements/elements/hello-world.css","../src/elements/elements/hello-world.html", ...]
This causes breakpoints set in VS Code to be missed. Breakpoints set in Chrome dev tools will still work though.
What is the expected behavior?
Source paths should be correct e.g.
"sources":["../src/attributes/color.ts", ...]
and VS Code will then hit breakpoints.Repro Steps
au new sad-vscode -u -s typescript,vscode,plugin-scaffold-basic -p
au run
Fix Suggestion
I don't really have the time to test this properly but this fixes the scaffolded plugin. I don't know if it impacts the standard app or how it behaves with deeper/more complex directory structures.
Change
cli/lib/build/bundle.js
Lines 315 to 320 in 1dc6179
To
VS Code debugging works
The text was updated successfully, but these errors were encountered: