Code Monkey home page Code Monkey logo

Comments (5)

joshtynjala avatar joshtynjala commented on May 22, 2024

Are you adding the breakpoint in the constructor of the main class? Last time I tried that, it didn't work for some reason. I suspect that the debugger hasn't fully connected yet. Try adding a breakpoint in an event listener somewhere, and you should see a difference.

Also, when using Chrome, make sure to exit the browser entirely and let VSCode launch it. The debugger won't work unless special command line options are passed in, so if it's already running, it won't work.

from vscode-as3mxml.

JohnSword avatar JohnSword commented on May 22, 2024

humm, I set an on click event and the breakpoint worked but I cant get it to stop on page load.
I tried with: window.addEventListener("load", onLoad, true)
The onLoad function is called but again the breakpoint fails. Do you have an idea how one could set a breakpoint in the constructor to break on page load?

from vscode-as3mxml.

joshtynjala avatar joshtynjala commented on May 22, 2024

I'm not sure. Like I said, it seems like VSCode's debugger might not be fully connected until after page load or something.

If you open Chrome's developer tools directly, and use its built-in debugger, a breakpoint in the constructor will work correctly, so it seems to be a VSCode issue.

from vscode-as3mxml.

JohnSword avatar JohnSword commented on May 22, 2024

thanks Josh, I got it working by setting an interval, like so:
interval = setInterval(onLoad,1000);

for debugging this is enough.

from vscode-as3mxml.

joshtynjala avatar joshtynjala commented on May 22, 2024

I found that if you add a debugger statement to your HTML page before you instantiate the main class constructor, the VSCode debugger will pause there as if there were a breakpoint. If you continue the debugging session, your breakpoints will work.

I added a more detailed description about this to the documentation:

https://github.com/BowlerHatLLC/vscode-nextgenas/wiki/Common-issues#debugger-will-not-stop-at-breakpoints-on-startup

from vscode-as3mxml.

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.