GithubHelp home page GithubHelp logo

Comments (7)

minggo avatar minggo commented on June 16, 2024

What platform did you debug on?

from cocos-engine.

smallmain avatar smallmain commented on June 16, 2024

What platform did you debug on?

MacOS, this problem should not be related to the system.

What I may not have made clear enough is that when debugging a project using VSCode, a single-step breakpoint does not allow access to the engine code because the source diagram path is wrong.

from cocos-engine.

minggo avatar minggo commented on June 16, 2024

debugging a project using VSCode

It sounds interesting, could i know how you use VSCode to debug engine code?

from cocos-engine.

smallmain avatar smallmain commented on June 16, 2024

Honey, this is a built-in feature of the engine...

image

i say if the project code has code similar to this.node.setPosition(), then when I enter the function call with a single-step breakpoint, because it is the code of the engine part, an error will be reported and cannot be entered.

So why can debug normally in Chrome DevTools?
After my search, it seems that DevTools has an automatic redirection function, but VSCode does not.
So your sourcemap must be absolutely correct.

from cocos-engine.

minggo avatar minggo commented on June 16, 2024

Oh, good to know. I don't know and use it.
Thanks.

from cocos-engine.

smallmain avatar smallmain commented on June 16, 2024

Oh, good to know. I don't know and use it. Thanks.

You're welcome, by the way, it would be great if it could support debugging Editor Preview in VSCode. The simplest way would be to expose a debugging port.

Or going one step further, it would be great if you could debug at breakpoints regardless of whether it is in Playing Mode like Unity.

I know that Electron is a multi-process model, which can generally be implemented very simply through the Multi-target debugging function of VSCode. document

from cocos-engine.

minggo avatar minggo commented on June 16, 2024

Sounds good.

from cocos-engine.

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.