Jump to content
markus_ja

Should the Debugger work?

Recommended Posts

Hello,

 

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?

 

 

 

Share this post


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.

Share this post


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):

 

Compile,

Switch to <Chrome>

Reload

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

Set a breakpoint

"Execute"

 

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?

 

TIA,

 

/Dany

Share this post


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.

Share this post


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?

Share this post


Link to post
Share on other sites

I've just installed the 3.0.0.12 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);
begin
  ShowMessage('Hello world');
end;

4. Put a break point on ShowMessage.

5. Tried Internal Web browser

6. Tried Chrome Debugger

Share this post


Link to post
Share on other sites

@JaredDDon't use the Source Map. You use it only if you want to set break points in the browser's debugger.

I just tested your steps 2-5 and the break point worked with the internal debugger.

Share this post


Link to post
Share on other sites

@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. 

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×