-
Notifications
You must be signed in to change notification settings - Fork 932
Create sourcemaps for easier debugging #996
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
Create sourcemaps for easier debugging #996
Conversation
|
Cool! This broke tests. Can you have a look? |
|
Yes, I'm trying to figure out why and which ones to look at 😅 |
|
We've recently fixed Windows tests on Azure, so only e2e-tests fail now |
|
@thymikee I'm looking into it what I'm seeing is really similar to this comment: If I change collectCoverageFrom: [
'packages/**/src/**/*.ts',
'!packages/cli-types/src/**/*.ts',
],everything passes but the output will get coverage for even for the files that have not been run in the tests (quite a few). From removing files it looks like the issue is under Any idea of what could be going on? |
e396f98 to
1e79760
Compare
|
Looks like windows failed because of I don't think it's related to the previous error and this one could maybe be avoid by increasing maxBusyTries` to something greater than the default 3. |
|
Can we rebase this PR to get green CI? |
@thymikee sure! |
1e79760 to
c57f6af
Compare
|
Everything is ✅ now 🥳 |
Summary:
I really need all the help I can get when coding. Having breakpoints in TypeScript instead of JavaScript is really high on my list. Otherwise I always end up modifying the JS and then erasing all changes in the next build because I was modifying the wrong place 😅
The only way I've found to make this work in this project is by creating sourcemaps.
Here's an example of it running on VS Code:
What it does:
.mapfor each file in the build process//# sourceMappingURL=FILE.mapto each JS generated file.mapfiles during the publishing process so the package doesn't increase in size. There were some packages that didn't have afilesproperty inpackage.json. I have not ignored in those cases.To make this work from VS Code you just need a regular node configuration like in the image above or the following:
{ "version": "0.2.0", "configurations": [ { "type": "node", "request": "launch", "name": "CLI", "skipFiles": ["<node_internals>/**"], "program": "${workspaceFolder}/packages/cli/build/bin.js", "args": ["doctor"], "console": "integratedTerminal", "cwd": "${workspaceFolder}" } ] }It does not require setting up the
sourceMapsoroutFilesproperties.In this case I'm running the CLI package with the
doctorparameter (args). This file is currently ignored by.gitignoreeven though there are some files from.vscodethat are committed.Happy to contribute this
launch.jsonor try to come up with something more generic if wanted.Test Plan:
N/A