Giter Site home page Giter Site logo

Comments (3)

louislatreille-cb avatar louislatreille-cb commented on May 24, 2024

Update:

I've noticed the following:

  • Breakpoints in the log file being executed are bound properly and immediately.
  • Breakpoints in the API packages are eventually bound, when the debugger is fully started
  • Breakpoints in the common package are never bound, and even after the debugger is fully started, it's impossible to set any in the common package
  • Stepping into code from the common package shows incorrect lines/files

Sent another log file when going through the steps that lead to the above conclusions.

from vscode-js-debug.

connor4312 avatar connor4312 commented on May 24, 2024

This is a common issue in monorepos, you're building your "common" code, but then your tooling is not "following" the sourcemaps in the compiled code. When it's bundling the code, it's creating sourcemaps that reference the already compiled bundle rather than your actual source code, e.g.

{
	"version": 3,
	"sources": [
		"chunk-ZZYPPKAZ.js" // <- should be your actual sources, not just the chunk
	],

I think that you might not be building with sourcemaps in your common code, as both vitest/esbuild and js-debug have logic that may handle this case if that were so.

from vscode-js-debug.

louislatreille-cb avatar louislatreille-cb commented on May 24, 2024

@connor4312 Thanks for the reply.

Actually, we do generate source maps for our common package. In fact, everything was working fine not too long ago. I tried going as far as 3 months back into our commit history, but still have the same issues with the debugger, which leads me to believe that we're either doing something wrong with our launch configs, or something changed with the debugger.

Based on your comment, I tried disabling code splitting in our bundler. This eliminates all the chunk files. Still getting the exact same issue though. Sent another log file to your email with that.

Here's another look into my issues:
image
image
image

This is the result after clicking twice on line 308 in calculateUtilities.ts. As you can see, the breakpoints make no sense.

from vscode-js-debug.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.