Change default CMD in console mode programming lazarus / 12-Debugger ---------------------------------------------------------------------- aradeonas · 2015-07-08 20:38 Hi, Is there a way to change default cmd when we develop console application so other console will open instead of windows's default? I tried ConEmu and it has a Default terminal option but it wont effect Lazarus. ---------------------------------------------------------------------- aradeonas · 2015-07-20 14:54 So all windows developers here use default cmd? ---------------------------------------------------------------------- Cyrax · 2015-07-20 15:23 Rename ConEmu's executable to cmd.exe and change your system PATH environment variable so that the directory where renamed ConEmu's executable lies, is first item in the path list. Now Lazarus should start ConEmu executable instead old cmd.exe. ---------------------------------------------------------------------- rvk · 2015-07-20 15:55 Quote from: Cyrax on July 20, 2015, 05:23:00 pmRename ConEmu's executable to cmd.exe and change your system PATH environment variable so that the directory where renamed ConEmu's executable lies, is first item in the path list. Now Lazarus should start ConEmu executable instead old cmd.exe. He's not talking about a shell cmd.exe but about a simple "hello world"-program which runs a standard black console (at least, that's how I understand "console application"). Using an alternative cmd.exe on your system will lead to lots of strange problems (looping of executables, batch files etc). You could also use the "Image File Execution Options" registry entry to let the OS think it's starting cmd.exe but really start conemu.exe. But that leads to the same trouble. B.T.W. ConEmu uses cmd.exe itself to start the real console. So using conemu.exe as cmd.exe will definitely lead to looping. Anyway... If you set ConEmu as default terminal (via the integration options) a .exe (outside the IDE) will run "via" ConEmu. From inside the IDE gdb.exe "takes over". I'm not sure how to override the console for gdb.exe but the adding it to the hooked executables doesn't work. ---------------------------------------------------------------------- aradeonas · 2015-07-21 03:45 Thank you. As I think like you so asked here maybe one of the team members can answer. ---------------------------------------------------------------------- Thaddy · 2015-07-21 05:55 If you use f.e. the crt unit you can have any console you like. Also, I guess you are using windows, so you can also use the hardcore low level api functions: AllocConsole etc, but crt encapsulates that for you. A different option is to use FreeVision (on which the textmode ide is build). Loads of options. ---------------------------------------------------------------------- aradeonas · 2015-07-21 06:20 Can you explain more? f.e. ?crt ?FreeVision ? ---------------------------------------------------------------------- Maximus5 · 2015-07-28 08:06 You need to do only two steps: 1. Update ConEmu to build 150727 or later 2. Add to the DefTerm hooked executables two files: "lazarus.exe|gdb.exe" ---------------------------------------------------------------------- aradeonas · 2015-07-28 08:43 Happy to see you here Maximus5 and thank you for the good job. I update ConEmu to the last version 150727 and set the setting but there is no change. Also please update sf version.