fusionjs / fusion-cli

Migrated to https://github.com/fusionjs/fusionjs
MIT License
140 stars 37 forks source link

Unable to debug with --watch #679

Open supersonicclay opened 5 years ago

supersonicclay commented 5 years ago

Type of issue

Bug

Description

Unable to debug with fusion test --watch --debug

This works:

JEST_ENV=dev node --inspect ./node_modules/.bin/jest --config=./node_modules/fusion-cli/build/jest/jest-config.js --watch --runInBand --no-cache

Neither of these works:

./node_modules/.bin/fusion test --watch --debug
./node_modules/.bin/fusion test --watch --debug --runInBand --no-cache

It hits the breakpoint in node_modules/jest/bin/jest.js, but not in my actual test. I'm using latest fusion-* versions.

Your environment

KevinGrandon commented 5 years ago

Re-opening since we are able to reproduce with an internal app, and using VS Code. Potentially related to source maps?

KevinGrandon commented 5 years ago

I believe this case was due to a top-level jest dependency declaration, we shouldn't have those.

supersonicclay commented 5 years ago

@KevinGrandon I removed jest from top level devDependencies and it still doesn't hit breakpoints in my tests with VS Code.

KevinGrandon commented 5 years ago

Summary of current issues:

Current hunch is that there is a sourcemap or configuration mismatch.

Note: These manifest when opening upt he "dedicated DevTools for Node" as well.

KevinGrandon commented 5 years ago

Potentially useful resource: https://stackoverflow.com/questions/50765353/visual-studio-code-breakpoint-appearing-in-wrong-place