Beta: Breakpoint not working(?)

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
This may just be me not understanding how this is supposed to work. (Are there directions anywhere?)

In the screen shot below, I entered 3 breakpoints. When the program got to this Sub, I saw a notice on the screen of the app saying that is was on line 5605, but it didn't stop. It went on to line 5610 and stopped. Except that if you look at the Logs tab, the execution didn't stop even though the yellow line makes it appear to have stopped on 5610.

The first breakpoint (where it didn't break) is line 5603. At this point, the variables p=3 and s=3. About half way down the Logs list, you can see the line "Discard for player 3, suit led: 3", which is line 5603, yet as you can see, execution continued until all lines of code that could be executed were executed and the program was waiting for the user to press a button.

debug.jpg
 

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
Something is not working correctly here. The Subs stack / variables should not be empty. Is this behavior consistent in your program?

Can you upload your project (or send it to me if you prefer - [email protected])?

I've uploaded it to http://www.hsv-life.com/CSSpades 2011-04-29.zip

This is a work in progress, so it loads a set deal (for repeatability in testing the code) and goes into the automated play mode. Once you start it running (having set the breakpoints as shown in the prior screen shot), just keep pressing the Okay button. There is one round of bidding, then the play will begin. Continue to press Okay.

On the fourth trick, North will lead the Ace of Diamonds. Press Okay for the last time. East is out of Diamonds, which takes you to the Sub p110_Discard where the breakpoints are.
 
Upvote 0

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
Erel -- While you are looking at my code, see if this happens to you:

files tab.jpg

Move the scroll bar down as far as it will go in the Modules tab. The last Sub should start "Unused...". In the shot above, you can only see part of it. Depending on the window's vertical size, you may see all or none of it. The amount shown can be changed by clicking on the bottom of the window to resize it vertically, so if you see the whole line, try resizing to see if you can replicate the above. (The scroll bar remains all the way at the bottom, no matter how much of the line shows.)

This problem is not new to the beta version. I reported it before in the Bugs forum, but got no reply, so perhaps you can't reproduce it. It does require a list of subs longer than the space available so that the scroll bar comes into play.
 
Upvote 0

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
I just tried debugging a much smaller app of mine and got the same result of the breakpoints not stopping the execution.

So then I tried compiling FamilyMeds (from the user creations uploads forum) and the debugger worked as it should. GuessMyNumber - worked. Now I'm thinking it's just something with my code, so I tried the Card Game Shell which I had uploaded to the user creations forum, and it worked.

I tried closing B4A with the Spades game in it and reloading it. Put a breakpoint in a different location (the btnOkay_Click sub) and it did NOT work right. (Break at line 408 if you don't want to have to go through all the steps I said in the other message.)
 
Upvote 0

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
Erel = I forgot to tell you that my app has several layouts with it, but the only one I've been keeping up to date to work on is the 800x480x160 layout, so the app may not run unless you set up an emulator (or have a device) that size.
 
Upvote 0

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
Great!! The debugger is so awesome looking that I can't wait to start using it with my big app-in-progress. It has often taken me hours to track down coding errors because of no single-stepping and examining variables. If VB6 is any indicator, I expect those kinds of problems to now be solved in a matter of minutes!

I'm just blown away that you were able to implement this. Give yourself a big pat on the back. (Sorry, but I can't give you a day off, though. Keep working!)
 
Upvote 0
Top