Using ProEnv, I have configured my computer to start the standard debugger in case my Progress application shows a message (press the "Help" button and in the callstack, click on "Debug"), this is done using this ProEnv environment variable:
DLC=C:\PROGRE~1\OpenEdge
My application is started, using the -debugalert switch.
However, now I'm starting working with PDSOE (Progress Developer Studio for OpenEdge) and I would like to start up that debugger, in the mentioned case. I don't know how to do this, because PDSOE is based on Java technology (it's an Eclipse environment).
Does anybody know how to do this?
Thanks in advance
The way to launch the PDSOE variant of the debugger is from within PDSOE, using a "Debug Configuration". If you've run the application this way, the PDSOE debugger is used regardless of whether you use breakpoints or the <debug> button.
If you run the application from a "Launch Configuration", then the <debug> button will launch the standalone debugger.
They're basically functionally equivalent but TL;DR you'll need to run the application using PDSOE's "Debug Configuration".
Double click in the left margin of your source to set a break point (a small blue ball):
Then start your run configuration in debug mode:
You will be prompted to switch to debug perspective.
Add DEBUGGER:INITIATE(). DEBUGGER:SET-BREAK(). anywhere in the code and execute the application (provided you've already run prodebugenable -enable-all from the ProEnv in Admin mode).
Related
I am trying to attach a debugger of Cheat Engine to an application that wrote by me with C# VS2015. It always displays a message of debugger timeout, no matter what debugger mode I selected. How to attach a debugger of cheat engine successfully?
Error Message Capture:
https://postimg.cc/jDC1CYkC
https://i.postimg.cc/8zbgK1Rd/debugger-time-out.png
Download x64dbg and SyllaHide
Copy x64 of SyllaHide to x64dbg folder
Open x64dbg and attach the application you want.
Go to the "Dump1 view" of "CPU" tab. Press Ctrl+G, enter the address you want to set a breakpoint. And then move the cursor over the address and Right click select breakpoint, then select "Hardware, ACESS"
If the value is changed, the debugger will locate the induction and stop at there.
No matter if I choose "Attach to packager" configuration running packager with
react-native start
first or "Debug Android", breakpoints that I set in vs code are greyed out and are not get hit.
Here is information I am getting from Debug Console:
OS: win32 ia32 Adapter node: v7.9.0 ia32 vscode-chrome-debug-core:
3.23.0 Starting debugger app worker. Established a connection with the Proxy (Packager) to the React Native application Debugger worker
loaded runtime on port 10029 Running application "EugeneKrApp" with
appParams: {"rootTag":71}. DEV === true, development-level warning
are ON, performance optimizations are OFF index.bundle:19019 Warning:
componentWillMount is deprecated and will be removed in the next major
version. Use componentDidMount instead. As a temporary workaround, you
can rename to UNSAFE_componentWill
There is a bunch of warnings down the line like the last one about componentDidMount which I didn't include, they hardly influence debugging.
I had the same problem. It was due to the fact that 'Debug JS Remotely' was not enabled on the device/emulator.
Please check Tunvir Rahman Tusher answer and comments on this question.
Enter 'adb shell input keyevent 82' in the cmd/bash on your dev machine while the app is open on the device/emulator. A dialog box opens on the device/emulator like
Select 'Debug JS Remotely' and it will work out. You might need to restart the debugger.
When running a console application in Visual Studio via "Start without Debugging" (Ctrl+F5), the console remains open at the end of the run asking to
Press any key to continue . . .
thus requiring to activate the window and hit a key. Sometimes this is not appropriate.
Why this matters:
At the very moment I write json serialisation code, my workflow goes like this:
adapt c# code
run a console app that writes file out.json
view out.json in the browser with a json viewer
do this again and again, no need to debug anything, just trimming serialisation and check output is good.
It is workflows like this, where the "press any ..." behavior is hindering as it requires the steps
activate the console window
press key
.
No answers:
Starting the application outside VS in a separate console is not an answer.
Saying, you dont need this.
I'm pretty sure that you cannot affect or change this behavior.
As you mention, it has nothing to do with your application itself, because it doesn't do it when you double-click on the EXE. You only see this effect when you run the app from within Visual Studio without the debugger attached.
Presumably, when you invoke Ctrl+F5, Visual Studio is running your app in a particular way that causes the console window to remain open. I can think of two ways it might be doing it:
%COMSPEC% /k "C:\Path\To\YourApplication.exe"
or
%COMSPEC% /c ""C:\Path\To\YourApplication.exe" & pause"
With either of these, the pausing behavior you're seeing is baked right into the command used to launch your app and is therefore external to your application. So unless you have access to the Visual Studio sources, you're not going to change it. Calling an exit function from your app won't have any effect because your app has already quit by the time that message appears.
Of course, I can't see why it really matters, aside from an issue of curiosity. This doesn't happen when you start the app with the debugger attached, which is what you'll be doing 99% of the time when you launch the app from the IDE. And since you don't ship Visual Studio along with your app, your users are going to be starting the app outside of VS.
In response to the updates made to your question, the best solution would be to change your app so that it is not a console application. This behavior doesn't affect standard Windows applications; when they get closed, they close for good.
If you do not require any output on the console window, then this is very simple to do: just change the "Application type" in your project's properties. A Windows Forms application will work just fine. If you do not display a window (aka form), one will not be automatically created. This is the difference between regular Windows applications and console applications, which always create a console window, whether you need one or not.
If you do need to display output on the console window, you have a couple of options:
Create and use a simple form with a ListBox or ListView control. Each line that you would normally output to the console, you add as a new item to the list control. This works well if you're not using any "advanced" features of the console.
P/Invoke and call the AllocConsole function to create a console that your Windows application can use. You do not need a form for this.
I found a solution that works if you are using python (I could not test anything else).
You need to go to
Tools -> Options -> Python Tools -> Debugging
Uncheck Wait for input when process exits normally.
I hope you can apply this somehow to your problem.
2020 UPDATE : Microsoft has listened.
It also closes the console in "Start Without Debugging" mode ;)
The setting is a little buried, but works :
Well, at least in Visual Studio 2010, typing
Console.ReadKey(true);
Removes the "Press any key to continue....."
According to the VS2019 documentation:
Automatically close the console when debugging stops: Tells Visual Studio to close the console at the end of a debugging session.
It works, but only if you make sure your project starts with the debugger on. This sounds trivial, but I was trying at first with a solution with two projects, one Console one to copy files to use in my app, the other to run the actual app. I set the Console one to Start without debugging because I don't need debugging on it, but that did not close it after it ran. Only when setting it to Start (with debugging) this option worked.
In vs2017 you have to uncheck the python environment setting under the vs-options:
in german: Auf Eingabe warten, wenn der Prozess normal beendet wird
I've been following this guide to debug a Windows Service application.
Basically, I need to attach the Visual Studio debugger to the process started after installing the Windows Service that has been developed. However, VS doesn't allow me attach the debugger to this process as shown in the following picture:
How can I attach the debugger to this process? If I clicked on any of the other processes the Attach button becomes enabled.
Any help would be greatly appreciated
check the checkbox Show processes from all users, then you will see AutomatedReports.exe. Attach that (not AutomatedReports.vshost.exe)
vshost is a host process to help with the debugging. More info on this MSDN Link
Also you need to place the following line in your service code where you want to hit the break point.
System.Diagnostics.Debugger.Break();
The service is probably running on a separate user account. Check the "Show processes from all users" checkbox and attach the debugger to AutomatedReports.exe process.
Also make sure that you are running a Debug build of the service, otherwise, you won't be able to debug a lot.
Have you tried to change the type of the code you are debugging?
Click on "Select ..."
Select "Debug these code types"
You can then select Types like: “Managed (v4.0…)"
I developed a small VBA procedure in MS Access 2003 module (just one public Sub)
The database is locked for me only, nobody else has access to the file.
My code works but there is a small bug I want to find and fix
I need to debug my VBA code. I put breakpoint at the first line of the procedure.
However, when I run this code, it never stops at the breakpoint and never enters to debug mode. Seems like VBA debugger is not working or disabled. I was not able to find any option how it is possible to disable/enable VBA debugger, I supposed it should be always enabled. Now I can debug this code only with the help of putting a lot of message boxes, but it takes a lot of time...
Please see:
ACC2002: Breakpoints Are Ignored in Visual Basic for Applications Code
Enable the Use Special Access Keys startup option.
To do so, follow these steps:
Open the database in which the breakpoint has been set.
On the Tools Menu, click Startup.
In the Startup dialog box, click to select the Use Special Access Keys
check box.
Click OK to close the Startup dialog box.
Close and then reopen the database.
Run the code that contains the breakpoint. Note that execution of the
code pauses at the breakpoint, as you
would expect.
Office 2010 Steps to resolve:
File
Options
Current Database
Make sure "Use Access Special" is checked.
Close and reopen Database.