Jump to content

Should the Debugger work?

Recommended Posts



I never could make the debugger working. Beginning from v2.1, when it was introduced. Is that feature suppost do work?


When I activate debugging (pressing the small green bug button), and then execute the project, ...

1) the programm doesn't stop on the breakpoints

2) when I close the build in browser, the Execute button remains disabled. Thus, I need to restart the IDE in order to enable that button again.


Furthermore, using "Source Map" to see the code in the build in browser, the program doesn't stop at the breakpoint, set in the build in browser. It stops at some very strange positions, which doesn't belong to the source map code.


That means, I cannot debug my smart pascal code. Only the compiled java script code.


Do I miss some settings?




Link to post
Share on other sites

The debugger never worked properly on my machine either. It worked to some extend, but unfortunately it did not stop on certain breakpoints, which makes it unreliable and thus useless for me.


However, I have used source maps successfully in the past. This said, I prefer to use JavaScript debugging nowadays as it gives the chance to see what the compiler generated. With this approach one can easily find bloated code or issues caused by a faulty compiler.

Link to post
Share on other sites

I've also never had debugging working.


Anyone has a better way of debugging instead of this (note the pages can not be locally retrieved):



Switch to <Chrome>


Open "Source", Ctrl+F, search for the place

Set a breakpoint



Is there maybe a way to jump into the produced script from the SMS IDE? That would help a lot.


Could you expand on how you are making use of the source maps?





Link to post
Share on other sites

@christian: are you using the internal browser to the external chrome browser?


For my first reall app I used mainly the internal browser. Except when I needed to test the audio output for AAC files. These are not supported by the internal browser as it would require to acquire a valid license for this codec (which is way too expensive for the limited use).


However, I had the chrome developer tools open all the time. Especially when it comes to measuring and improving the performance of the app there's no way around these tools.


For Android debugging I used chrome (again in combination with the developer tools). For iOS I used XCode and Safari. XCode can give you better hints about the real memory usage of the app where-as Safari can look at the DOM. While the latter was not required for my first app, it is more important for the current app I'm working on.

Link to post
Share on other sites

I am definitely not trying to shun the webkit/F12 tools. They are absolutely necessary. And i live inside there a lot.


And i guess that the feat of integrating Chrome like in the JetBrain product line would be over the top for the SMS team.


But we could save a lot of woe, for example by having a function that could jump to a row in the source in the selected browser window... That is but one thingy. No?

Link to post
Share on other sites
  • 1 year later...
  • 2 months later...
  • 10 months later...

I've just installed the release and done the following but it debugging is not working:

1. Check Project Options -> Linker -> HTML & CSS -> Add Source Map (for debugging)

2. On smaller code frame toolbar, check the "Enable/Disable debugging". Blue dots appear in code window gutter.

3. Add a W3Button, and ButtonClick

procedure TForm1.W3Button1Click(Sender: TObject);
  ShowMessage('Hello world');

4. Put a break point on ShowMessage.

5. Tried Internal Web browser

6. Tried Chrome Debugger

Link to post
Share on other sites
  • Administrators
2 hours ago, JaredD said:

@jarto Thank you. that does help! I have struggled with this seemingly work randomly.

As feedback it might be useful to re-caption "Add Source Map (for debugging)"  since it appears to break debugging. 

Yes, will do that. Thank you.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...