Why do I have these paths in Intellij IDEA console? - windows

I've just installed IDEA on my new PC and when I try to run my project, before the result I see these paths:
"C:\Program Files\Java\jdk-11.0.2\bin\java.exe" -javaagent:C:\JetBrains\IntelliJ_IDEA_Community_Edition_2019.3.3\lib\idea_rt.jar=55779:C:\JetBrains\IntelliJ_IDEA_Community_Edition_2019.3.3\bin -Dfile.encoding=UTF-8 -classpath "C:\Users\Hor\IdeaProjects\HF Java\out\production\HF Java" Ch3.
14 //result
Process finished with exit code 0
I didn't have that on my previous PC. How do I solve the problem? I'd like not to see this 'pathway' line..

There is no explicit setting responsible for displaying the system message in the 'Run' tool window (Alt+4) - other than File | Settings | Editor | Color Scheme | Console Colors > 'Console' section > 'System output' option.
However, if you run your application via the 'Services' tool window (Alt+8), the system message will be partially folded and faded:

Related

How to use the OpenEdge debugger (OpenEdge Debugger 11.6)

I'm working with OpenEdge Progress-4GL AppBuilder and Procedure Editor, and now I'd like to start working with the OpenEdge Debugger, release 11.6.
As found on quite some places on the internet, I've taken following actions to enable debugging of my Progress application:
Using Proenv, I've launched following command:
prodebugenable -enable-all
I get following response:
OpenEdge Release 11.6 as of Fri Oct 16 19:01:51 EDT 2015
==============================================================================
PROGRESS Debug Enabler
==============================================================================
Debugging is enabled for the Progress 4GL installed in
C:\PROGRE~1\OpenEdge.
For your information, some information on environment variables:
proenv>set DLC
DLC=C:\PROGRE~1\OpenEdge
proenv>set WRK
WRKDIR=C:\OPENED~1\WRK
proenv>set ENABLE_OPENEDGE_DEBUGGER
Environment variable ENABLE_OPENEDGE_DEBUGGER not defined
As far as my application is concerned, the application is based on a shortcut, which looks as follows:
C:\Progressx86\OpenEdge\bin\prowin32.exe
-basekey "INI"
-ininame c:\progress\our_application\progress.ini
-pf c:\progress\our_application\misc\run_our_application.pf
-p our_application.r
-rr
The file "run_our_application.pf" contains a list of entries, like the following:
-db our_DB
-H DC1
-N tcp
-S 6543
To the mentioned shortcut, I've added -debugReady 5001 in order to enable debugging, based on TCP portnumber 5001. When I launch the application, I get a warning message about this, and netstat -aon gives me following entry:
TCP 0.0.0.0:5001 0.0.0.0:0 LISTENING 11344
Where 11344 is confirmed as the prowin32 application.
In OpenEdge debugger, I've following entries in menu item "Edit", "Preferences", "Attachable":
C:\progress\our_application
Z:\Progress\our_application\PRG
C:\Progressx86\OpenEdge
For your information: The Z:-drive is an external server drive, Z:\Progress\our_application\PRG is the directory where files (*.w and *.p) get compiled into *.r files, the file our_application.r can be found there.
Nevertheless, when I open a *.w file and I go to the menu "Debug", the "Attach to Process" menu item stays disabled.
What can I do in order to debug my application/*.w file?
There are several ways of debugging. Start simple. You should be able to use any of the following:
from the procedure editor
Instead of selecting [ Compile / Run ], select [ Compile / Debug ]. The AVM will start executing the current file and the debugger will suspend execution on the first line.
from any alert-box
Add -debugalert to your startup parameters and every alert-box will display an additional 'Help' button. Clicking on it will show the stack-trace and a 'Debug' button. Clicking on that will start the debugger, execution is suspended at the line of the alert-box, this can be your own alert-box or an error.
stand-alone debugger
Start the debugger application (the Windows shortcut starts proDebugger.bat) and select [ Debug / Attach To Process... ] you can then either enter a PID or select a local running session (AVM).
remote attachable debugger
This is what you seem to be trying to setup - this allows you to attach the stand alone debugger (see option 3) to a process running on another machine, this can be useful when you have an AppServer or WebSpeed agent that you want to debug.
PDSOE debugger
Not relevant for you since you are not using Progress Developer Studio for OpenEdge, but just mentioning it for completeness. This allows adding break points in your source code by double clicking in the left margin and stepping through your source code instead stepping through a debug-listing.

Unable to start debugging on bash on Windows within Visual Studio Code

I have installed WSL(Ubuntu on Windows) and gcc/gdb, and open a directory in Visual Studio Code, then click Debug Menu | add configuration, select C/C++:(gdb) Bash on
Windows launch, press F5,get the message:
Unable to start debugging, Unable to establish a connection to GDB, ...
output in debug console:
Starting: "C:\Windows\sysnative\bash.exe" "/usr/bin/gdb --interpreter=mi"
"C:\Windows\sysnative\bash.exe" exited with code -1 (0xFFFFFFFF).
I don't have enough points to leave a comment, but could you paste your
configuration in launch.json? One issue I have seen is that "/usr/bin/gdb --interpreter=mi" gets treated as single string instead of calling gdb with an extra flag. Updating my configuration with the following flag in pipeArgs fixed the error for me.
"configurations": [
...,
"pipeTransport": {
"debuggerPath": "/usr/bin/gdb",
...
"pipeArgs"; ["-c"],
}
]

VS Code - Integrated terminal exited with code 1

My VS Code integrated terminal is only toggling up for a second then disappearing with the command Ctrl+`(Tried to change it - still not working :)),
showing the Integrated terminal exited with code 1 error.
Any ideas for fixing it?
I had the same problem on Windows 10. The problem was that I had VSCode running in compatibility mode (Windows 8). If that is that case for you, just uncheck "Run this program in compatibility mode for" checkbox in Compatibility tab of the VSCode properties, click in OK and restart VSCode.
I had the same problem just a few minutes ago, in my case this error was a path consequence, my windows user folder has an accent (c:/users/josé /..) , so, just try to move your project into another folder, like "C:/projects".
Current Solution is using a none-English named Folder as project Folder.
Here is my research:
default value "terminal.integrated.shell.windows": "C:\\WINDOWS\\system32\\cmd.exe"
Following is the debug info in VScode:
terminalInstance.ts:55 Integrated terminal exited with code 1
(anonymous function) # terminalInstance.ts:55
emitTwo # events.js:100
emit # events.js:185
ChildProcess._handle.onexit # internal/child_process.js:204
Following is debug info in Atom:
C:\Users\mzvast\AppData\Local\atom\app-1.9.1\resources\app.asar\src\task.js:52
Unable to start terminal process. Win32 error code: 267 Error: Unable
to start terminal process. Win32 error code: 267
at Error (native)
at Server. (C:\Users\mzvast.atom\packages\platformio-ide-terminal\node_modules\pty.js\lib\pty_win.js:67:9)
at emitOne (events.js:90:13)
at Server.emit (events.js:182:7)
at Pipe.onconnection (net.js:1439:8)
(anonymous function) #C:\Users\mzvast\AppData\Local\atom\app-1.9.1\resources\app.asar\src\task.js:52
(anonymous function) #C:\Users\mzvast\AppData\Local\atom\app-1.9.1\resources\app.asar\src\task.js:126
module.exports.Emitter.simpleDispatch # C:\Users\mzvast\AppData\Local\atom\app-1.9.1\resources\app.asar\node_modules\event-kit\lib\emitter.…:25
module.exports.Emitter.emit # C:\Users\mzvast\AppData\Local\atom\app-1.9.1\resources\app.asar\node_modules\event-kit\lib\emitter.…:125
(anonymous function) # C:\Users\mzvast\AppData\Local\atom\app-1.9.1\resources\app.asar\src\task.js:78emitTwo
# events.js:100
emit # events.js:185
handleMessage # internal/child_process.js:718
channel.onread # internal/child_process.js:444
The win32 error code 267 seem to be,according to microsoft:
ERROR_DIRECTORY
267 (0x10B)
The directory name is invalid.
Close vscode, create a new folder somewhere on your pc, but not inside the directory which was previously opened with vscode. Open this new directory with vscode and then try opening your terminal. If your terminal opens, then the problem was with your previous directory. This happened with me, the directory didn't exist but was listed in my file explorer. Now, whenever your start your terminal, it will start with the same directory which is opened in your vscode. In this case, the directory didn't exist or had same issues, hence the problem.
Important!!
First, try this method.
Create a dummy directory anywhere on your PC, except the present directory that
is open in your Explorer.
Save any thing that is open.
Open the dummy directory that you created File > Open a folder > 'Your Folder'
Try opening integrated terminal using View > Terminal.
If this works, then there's a problem with the directory. Create a new directory and migrate all files to that directory.
If not, then try changing the settings listed here in other answers or check whether VSCode is running in Compatibility Mode or not.
I had the same Exit code 1.. And found the solution as below..
Open the settings on Visual Studio Code and click Edit in settings.json as marked:
Change the terminal.integrated.shell.windows settings on the red marked line as you see:
just uncheck "Run this program in compatibility mode for" checkbox in Compatibility tab of the VSCode properties, click in OK and apply and restart VSCode.

Netbeans: C code debug hangs on start

When I start debug in Netbeans, nothig happens. Output strings don't apper; Pause, Continue, step buttons are inactive (only Stop debug button and restart button are active). Stack window is empty.
I tried to run process in shell and attach to it by Netbeans debug. Message with caption "Debugger error" appeared, it contained a text: \320\235\320\265\321\202 \321\202\320\260\320\272\320\276\320\263\320\276 \321\204\320\260\320\271\320\273\320\260 \320\270\320\273\320\270 \320\272\320\260\321\202\320\260\320\273\320\276\320\263\320\260.
Project is compiled with -g flag; gdb version is: GNU gdb 7.0.1-debian; Netbeans version is 7.1; In DDD tool debug for this program works fine.
In my case the cause was a bad variable in the Watches. I couldn't delete it while debugging was hanging. So I had to open the variables window manually while not building/debugging (Windows -> Debugging -> Variables). After deleting the bad variable, everything was fine.
Basically I deleted all variables, since I couldn't figure out, why gdb or netbeans disliked something like:
(char*)_Foo->Bar->Fail. During the previous debugging run this watch worked fine.

Custom debug command in Visual Studio using a Makefile project

I have a Makefile-powered project in Visual Studio 2010 (uses NAnt, in fact, but that's beside the point).
The output of the build process is a .elf file, and I have a separate, non-VStudio debugger which can be run on that .elf file to debug it.
Building works fine, but when I click the 'debug' button (little green triangle), VStudio fails with "Unable to start program 'XXX.elf'. The specified file is an unrecognized or unsupported binary format"
I'm guessing VStudio is just trying to 'run' the .elf as though it were an .exe, and failing.
What I really want VStudio to do is run "my_debugger.exe XXX.elf" when I press the debug button.
I have tried adding a file association with .elf=>my_debugger.exe
I have updated PATHEXT appropriately as well, and run VStudio under those changes.
Still no luck.
Isn't there somewhere in VStudio where you can specify a custom debug command? I thought there was, but can't find it.
I could just have the build process output a .bat file or something I guess, but this seems silly.
As Jim mentioned you can specify which app to start on run in the project settings (Command field). If you place a debugger there you can pass down your executable as an argument to the debugger being launched (Command Arguments field). This way you can launch the debugger which in turn will launch your executable if the debugger expects any commandline arguments.
MinGW on Windows example:
Command: gdb.exe; Command Arguments: Path\ToMyApp\whatever.exe
will start gdb.exe, gdb.exe will open whatever.exe, parse the debug info and wait for debug instructions.
Command: msys.exe; Command Arguments: gdb.exe Path\ToMyApp\whatever.exe
will start msys.exe, msys.exe will execute "gdb.exe Path\ToMyApp\whatever.exe"
Look at the project properties. Do you have a Debug tab which has a Start Action section giving three choices? Those choices would be: ( ) Start project, (x) Start external program: ... ( ) Start browser with URL.
You can also set the command line arguments and working directory.
Cf. How to: Change the Start Action for Application Debugging

Resources