Help get this topic noticed by sharing it on Twitter, Facebook, or email.

What is debug mode?

Seems like something of a misnomer - is it really just a way of editing files locally? I would expect a debug mode to include a debugger with source code breakpoints, etc. Am I going to be disappointed?
2 people have
this question
+1
Reply
  • Shlomo (Official Rep) April 30, 2013 14:49
    Hello Alex:

    Debug Mode enables you to rapidly develop, test, and debug your extension on your local computer using your preferred Integrated Development Environment (IDE). So whilst it doesn't provide a debugger with breakpoints at this time, it does provide a familiar and convenient way of coding and helps to speed up the development and debugging process as everything is local.

    Additionally, many developers take advantage of this environment for faster code debugging using console.log messages, as the results are readily available as soon as the change is made.

    Finally, we have it on our roadmap to investigate the possibility of adding debugging with breakpoints in the future, and hence the name is a placeholder. However, this is a long term project due to the difficulties of implementing breakpoints such that it works on the browsers we support. Hence, it will not be available any time soon.
    • This is pretty disappointing.

      I don't understand why Crossrider can't be an API wrapper for the various browsers instead of all this non-sense with remote code and proxy wrappers. Not being able to debug with breakpoints? Seriously?! Who decided that's acceptable to forgo?
    • Shlomo (Official Rep) July 11, 2013 13:23
      Hello Alex,

      Thank you for your feedback. Please allow me to explain a little about the history of our platform.

      Firstly, our platform is a lot more than just a JS API library that you can download and include in an extension.

      Our general ethos is similar to that of Chrome, to provide an easy to use cross-browser extension development platform for our users. We started by providing our IDE environment, which is still the most popular method of developing our extensions, but recognized that there are users who prefer to use their own IDE.

      Hence, we developed the Debug Mode environment which provides the ability to use any IDE for writing the extension code and immediately realize the changes in the browser (this is now also possible using our IDE's staging mode). One of our goals is to build a debugging tool, though it isn't an easy task due to the complexities and disparities between extension development environments for the supported browsers (and their different versions). This is a long term project and at this time we don't have a timeframe for it's release.

      So in answer to your specific question, we did not decide it was acceptable to forgo debugging, and being developers ourselves we do appreciate the need for debugging and hence our goal to provide a debugging tool.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • Shlomo, can you please clarify how Debug Mode should really work?

    I went through the steps, and configured local file path (pointing to a running Apache on port 8080 — if I open the URL I set as the file path in browser I can see the directory listing). What next? My extension's popup (opened from browser icon) stops working as soon as I specify local file path, and when I try to edit local extension.js to insert a console.log at the beginning, it is not seen on any pages I try. Should I somehow refresh / restart / otherwise initialize the extension for it to start working in debug mode?

    I am doing this with extension #68653.

    Also, what is your recommendation browser-wise? I guess Chrome will randomly delete the "debug-mode" extension on restart ('cause it doesn't come from the Chrome Web Store), so it would be better to use Firefox for development?

    Thanks!
    • view 1 more comment
    • Hm, that is odd, the extension does work from the IDE, yet as soon as I configure it to use debug mode — it stops, even the popup doesn't open. I am doing this in Chrome.
    • I suggest testing with a simple extension first which just has a button and nothing else. If it works them there is probably something the extension code that preventing the button from loading in the other extension.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited