Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / [SOLVED] Breakpoint not hit and "That file is not part of the project being debugged"

Author
Message
Dale Schultz
User Offline
Joined: 1st Nov 2021
Location: Maine, USA
Posted: 19th Nov 2021 15:39
I have run into a peculiar situation:

I have an AppGameKit app call Cab.agk
its main.agc includes the line:



and indeed code in the Cab.agc file get called and executed as one would expect.

Now, I add a breakpoint to a line of code, I get the red spot in the margin and I start the debug session.
The code line that the breakpoint is on gets executed but the debugger does not stop there.


If I then add a second breakpoint in the same file the debug window gives the message:
That file is not part of the project being debugged



Well, it is the only file I have called Cab.agc and it indicates that for some reason the file is being excluded from the debugger. (That would explain why my initial breakpoint never gets hit.)

I have managed to step into included files before but the place I need to get to is a few files deep from a call from my main loop so stepping to there from the main loop would involve thousands of calls.
What do I need to do to get the debugger to honor these breakpoints? (Apart from maybe moving the code into main temporarily)

I am running version IDE 2021.10.19 on Windows 10

Attachments

Login to view attachments

The author of this post has marked a post as an answer.

Go to answer

jd_zoo
4
Years of Service
User Offline
Joined: 12th May 2018
Location: Nova Scotia
Posted: 21st Nov 2021 23:06
I just did a test in an included file and the debugger did get there. Question if you added it to your project through the explorer?
Dale Schultz
User Offline
Joined: 1st Nov 2021
Location: Maine, USA
Posted: 22nd Nov 2021 22:03
I don't recognize that menu, I am using AppGameKit classic.
jd_zoo
4
Years of Service
User Offline
Joined: 12th May 2018
Location: Nova Scotia
Posted: 1st Dec 2021 01:49
Sorry took so long for me to reply, I don't use Classic very often and just opened it up and I'm not even sure how to import a file to a project. There is a project tree window that shows all the files included in your project, the Cab.agc file should show up under your project (I think...)
Dale Schultz
User Offline
Joined: 1st Nov 2021
Location: Maine, USA
Posted: 1st Dec 2021 13:53
No problem. I don't see a way of adding an existing file to a project, and I have some files of common functions I use in different projects.

What I see, to have to do is move the function I need to debug into my main, do the debugging and then remember to move it back again later.
adambiser
AGK Developer
7
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 2nd Dec 2021 05:46
This post has been marked by the post author as the answer.
In Classic, you can right-click files in the Project tab and if they are not a part of any project (at the top of the list, not hanging from a project file), there's a menu item to "Add to Current Project".

AGK isn't always the friendliest at having multiple projects using the same code files.
Dale Schultz
User Offline
Joined: 1st Nov 2021
Location: Maine, USA
Posted: 2nd Dec 2021 13:28
oh thank you Adam!
I had been right clicking on the current project to add a file. I now find the menu item on the opened document right click.



Dale Schultz
User Offline
Joined: 1st Nov 2021
Location: Maine, USA
Posted: 14th Jan 2022 23:15 Edited at: 14th Jan 2022 23:18
well adding the file to the project does not solve the problem.

This image shows the file in the project, the include statement and the nonsensical file name it is trying to use for the breakpoint:


[I know not EXACTLY the same issue, so I will start a new thread for this...]

Login to post a reply

Server time is: 2022-10-03 02:22:38
Your offset time is: 2022-10-03 02:22:38