rphlmr / supa-fly-stack

The Remix Stack for deploying to Fly with Supabase, authentication, testing, linting, formatting, etc.
MIT License
289 stars 26 forks source link

Debugging / Sourcemaps? #38

Closed rcoopr closed 1 year ago

rcoopr commented 1 year ago

When debugging in vs code, breakpoints are shown in ./build/index.js and not in the original files. Is this expected / Is there a way to get full source map support?

rphlmr commented 1 year ago

Hello,

You can follow this link 😉

rcoopr commented 1 year ago

I found the problem was caused by the mocks/index.js

require("tsconfig-paths/register");
require("ts-node").register({ transpileOnly: true });
require("./start");

Converting all mocks to plain js restored breakpoints in dev mode

rphlmr commented 1 year ago

I found the problem was caused by the mocks/index.js


require("tsconfig-paths/register");

require("ts-node").register({ transpileOnly: true });

require("./start");

Converting all mocks to plain js restored breakpoints in dev mode

Oh, I'll try to see what I can do. Thx for your investigation.

rphlmr commented 1 year ago

Thank you, @Froskk :)

rcoopr commented 1 year ago

There may be a more elegant solution that still allows ts in mocks, I think it's the ts-node register that is confusing the debugger. May look into it further if I find some time.