Cannot execute the file with the internal debugger

Just starting out? Need help? Post your questions and find answers here.
User avatar
charvista
Addict
Addict
Posts: 949
Joined: Tue Sep 23, 2008 11:38 pm
Location: Belgium

Cannot execute the file with the internal debugger

Post by charvista »

Hello,
Today I have a strange problem.
I am coding and press the F5 button to run it (with a Debug to test it).
At runtime, it stops with the message: "Cannot execute the file with the internal debugger. Please try the standalone one."
I don't remember to have changed anything in the settings....
What is happening here? How to reset this? :?
- Windows 11 Home 64-bit
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
User avatar
mk-soft
Always Here
Always Here
Posts: 6320
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Cannot execute the file with the internal debugger

Post by mk-soft »

Wrong compiler selected on compiler options ?
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Justin
Addict
Addict
Posts: 956
Joined: Sat Apr 26, 2003 2:49 pm

Re: Cannot execute the file with the internal debugger

Post by Justin »

I think i had the same problem, try disabling windows defender
User avatar
charvista
Addict
Addict
Posts: 949
Joined: Tue Sep 23, 2008 11:38 pm
Location: Belgium

Re: Cannot execute the file with the internal debugger

Post by charvista »

I think i had the same problem, try disabling windows defender
You are right Justin, I disabled the real protection of Windows Defender, and it worked again.
Now, how to add an exception for PureBasic ?
- Windows 11 Home 64-bit
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
User avatar
charvista
Addict
Addict
Posts: 949
Joined: Tue Sep 23, 2008 11:38 pm
Location: Belgium

Re: Cannot execute the file with the internal debugger

Post by charvista »

Ok, I found that I could add an exclusion:
Folder C:\Users\<username>\AppData\Local\Temp
Then it works.
*BUT* this is dangerous, because many programs are using this folder, so malwares can run anything there.

PureBasic 6.10 should add a sub-folder, so the execution is done in a very specific PureBasic folder,
for example C:\Users\<username>\AppData\Local\Temp\PureBasic\

Question : Can I modify myself the location where PureBasic may run when pressing the F5 key?
- Windows 11 Home 64-bit
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
User avatar
mk-soft
Always Here
Always Here
Posts: 6320
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Cannot execute the file with the internal debugger

Post by mk-soft »

Compiler Option -> Compile/Run or Preferences -> Compiler -> Defaults
* Create temporary executable in the source directory

Added your scource base folder to an exclusion ...
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
charvista
Addict
Addict
Posts: 949
Joined: Tue Sep 23, 2008 11:38 pm
Location: Belgium

Re: Cannot execute the file with the internal debugger

Post by charvista »

mk-soft wrote: Wed Mar 13, 2024 9:20 pm Preferences -> Compiler -> Defaults
[Check] Create temporary executable in the source directory
Even doing so, the PureBasic_Compilation0.exe is still done in c:\Users\<username>\AppData\Local\Temp\
What is the "source directory"? Is that where my program is located at runtime? I see nothing there.
- Windows 11 Home 64-bit
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
User avatar
mk-soft
Always Here
Always Here
Posts: 6320
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Cannot execute the file with the internal debugger

Post by mk-soft »

The default setting is used for new files. Existing files must be set subsequently in Compiler Option -> Compile/Run.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
charvista
Addict
Addict
Posts: 949
Joined: Tue Sep 23, 2008 11:38 pm
Location: Belgium

Re: Cannot execute the file with the internal debugger

Post by charvista »

I got it. It works again well.
Thank you for your very valuable help!
Cheers
- Windows 11 Home 64-bit
- PureBasic 6.10 LTS (x64)
- 64 Gb RAM
- 13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
- 5K monitor with DPI @ 200%
Post Reply