Page 1 of 2
not built-in debugger and no console
Posted: Wed Apr 09, 2025 7:52 am
by stevie1401
With Linux Mint 22.1, I can't use the built-in debugger when writing a pure console program.
Openconsole() doesn't create a console.
Purebasic 6.20 x64
Re: not built-in debugger and no console
Posted: Wed Apr 09, 2025 8:05 am
by Fred
Did you set the program format to 'Console' ?
Re: not built-in debugger and no console
Posted: Wed Apr 09, 2025 8:09 am
by stevie1401
Yes
Re: not built-in debugger and no console
Posted: Wed Apr 09, 2025 1:40 pm
by PBJim
I'm not a Linux PureBasic user, but I remembered Rudy M had posted this too, also on Linux Mint 22. Unless I'm mistaken, the subject was discussed a couple of times in the past.
https://www.purebasic.fr/english/viewtopic.php?t=86373
Re: not built-in debugger and no console
Posted: Wed Apr 09, 2025 6:56 pm
by PeDe
I have Linux Mint 22.1 Cinnamon here and cannot confirm the error. The example code in the link from PBJim works here without errors. The console or ‘Terminal’ opens and the message is displayed in the debugger.
Peter
Code: Select all
PB v6.20/v6.21b4 x64
System:
Kernel: 6.8.0-57-generic arch: x86_64 bits: 64 compiler: gcc v: 13.3.0 clocksource: tsc
Desktop: Cinnamon v: 6.4.8 tk: GTK v: 3.24.41 wm: Muffin v: 6.4.1 vt: 7 dm: LightDM v: 1.30.0
Distro: Linux Mint 22.1 Xia base: Ubuntu 24.04 noble
Re: not built-in debugger and no console
Posted: Wed Apr 09, 2025 7:24 pm
by PBJim
Thanks for confrming, PeDe. There doesn't seem to be much to ascertain from the description, but if OpenConsole() does not display a console window, then what happens with compiled PB code when it's run directly from an already open shell prompt? I would have thought this was diagnosable.
It must be something related to this particular Linux installation.
Re: not built-in debugger and no console
Posted: Wed Apr 09, 2025 7:34 pm
by stevie1401
That's right. It works with Cinnamon. It doesn't work with MATE and XFCE.
Re: not built-in debugger and no console
Posted: Thu Apr 10, 2025 8:09 pm
by mk-soft
Whats the execute name of terminal ?
Re: not built-in debugger and no console
Posted: Thu Apr 10, 2025 11:38 pm
by kenmo
I have this problem too, but I'm new to PB Linux so I wasn't sure if it was my fault.
Elementary 7.1 (Ubuntu 22.04) PB 6.20 x64, I get "Cannot execute the file with the internal debugger."
Code: Select all
CompilerIf #PB_Compiler_OS <> #PB_OS_Linux
MessageRequester("", "This bug report is on Linux", #PB_MessageRequester_Warning)
CompilerElseIf #PB_Compiler_ExecutableFormat <> #PB_Compiler_Console
MessageRequester("", "This bug report is for Console build mode", #PB_MessageRequester_Warning)
CompilerEndIf
; Try to run this with Debugger ON, CONSOLE mode, LINUX
If OpenConsole()
PrintN("Hello")
Delay(2 * 1000)
CloseConsole()
EndIf
Re: not built-in debugger and no console
Posted: Fri Apr 11, 2025 8:38 am
by Fred
You can check this file to see all the supported terminals, may be there is a new one on your distro:
https://github.com/fantaisie-software/p ... nuxMisc.pb
Re: not built-in debugger and no console
Posted: Fri Apr 11, 2025 1:42 pm
by ColeopterusMaximus
If I can make a suggestion having the IDE look for an environment variable to determine the terminal would be great:
IE: Using:
Code: Select all
declare -x TERMINAL="/usr/bin/xfce4-terminal"
In the user profile would allow the PB IDE default to any terminal with minimal effort.
Regards.
Re: not built-in debugger and no console
Posted: Sat Apr 12, 2025 1:09 am
by kenmo
I do not see any terminal in my environment variables
however, thanks for the hint Fred, I've got it working on ElementaryOS now by adding "io.elementary.terminal" to the search, and I've already pushed it to GitHub
https://github.com/fantaisie-software/p ... c/pull/319
Re: not built-in debugger and no console
Posted: Sat Apr 12, 2025 2:48 pm
by Fred
Any chance to do the same for Mint 22.1 ?
Re: not built-in debugger and no console
Posted: Sat Apr 12, 2025 8:56 pm
by kenmo
Fred wrote: Sat Apr 12, 2025 2:48 pm
Any chance to do the same for Mint 22.1 ?
I don't have Mint, have never used it, but maybe @stevie1401 can confirm what the terminal executable is called on their Mint setup?
Re: not built-in debugger and no console
Posted: Sun Apr 13, 2025 2:57 pm
by stevie1401
It still doesn't work with the Xfce terminal, but I installed the Gnome terminal and set it as the default. It works now.