not built-in debugger and no console

Post bugs related to the IDE here
stevie1401
User
User
Posts: 81
Joined: Sat Oct 18, 2014 7:14 am

not built-in debugger and no console

Post 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
Fred
Administrator
Administrator
Posts: 18207
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: not built-in debugger and no console

Post by Fred »

Did you set the program format to 'Console' ?
stevie1401
User
User
Posts: 81
Joined: Sat Oct 18, 2014 7:14 am

Re: not built-in debugger and no console

Post by stevie1401 »

Yes
PBJim
Enthusiast
Enthusiast
Posts: 296
Joined: Fri Jan 19, 2024 11:56 pm

Re: not built-in debugger and no console

Post 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
PeDe
Enthusiast
Enthusiast
Posts: 284
Joined: Sun Nov 26, 2017 3:13 pm

Re: not built-in debugger and no console

Post 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
PBJim
Enthusiast
Enthusiast
Posts: 296
Joined: Fri Jan 19, 2024 11:56 pm

Re: not built-in debugger and no console

Post 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.
stevie1401
User
User
Posts: 81
Joined: Sat Oct 18, 2014 7:14 am

Re: not built-in debugger and no console

Post by stevie1401 »

That's right. It works with Cinnamon. It doesn't work with MATE and XFCE.
User avatar
mk-soft
Always Here
Always Here
Posts: 6244
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: not built-in debugger and no console

Post by mk-soft »

Whats the execute name of terminal ?
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
kenmo
Addict
Addict
Posts: 2043
Joined: Tue Dec 23, 2003 3:54 am

Re: not built-in debugger and no console

Post 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
Fred
Administrator
Administrator
Posts: 18207
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: not built-in debugger and no console

Post 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
ColeopterusMaximus
User
User
Posts: 66
Joined: Fri Oct 29, 2010 11:29 am

Re: not built-in debugger and no console

Post by ColeopterusMaximus »

Fred wrote: Fri Apr 11, 2025 8:38 am 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
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.
User avatar
kenmo
Addict
Addict
Posts: 2043
Joined: Tue Dec 23, 2003 3:54 am

Re: not built-in debugger and no console

Post by kenmo »

I do not see any terminal in my environment variables :cry:

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

https://github.com/fantaisie-software/p ... c/pull/319
Fred
Administrator
Administrator
Posts: 18207
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: not built-in debugger and no console

Post by Fred »

Any chance to do the same for Mint 22.1 ?
User avatar
kenmo
Addict
Addict
Posts: 2043
Joined: Tue Dec 23, 2003 3:54 am

Re: not built-in debugger and no console

Post 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?
stevie1401
User
User
Posts: 81
Joined: Sat Oct 18, 2014 7:14 am

Re: not built-in debugger and no console

Post 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.
Post Reply