How to debug a code on Logic-Apps? - azure-logic-apps

I'm using Logic-Apps for my project now. I think it's good and easy! However, It was difficult to debug during the coding of the logic. Because I couldn't to confirm the variables or status at a middle point of the code. Usually a developer can detect the variables during the execution of program on Visual Studio. How can I debug the code on Logic-Apps? Do you have an idea?

At the moment, Logic Apps can only run on Azure, thus while you are developing a workflow, in order to debug your code, you need to run it on Azure. Once you run it, you can see the inputs and outputs of each action for that instance, including setting variable actions.
You can see in the documentation how to monitor each instance and the inputs and outputs of each action.
HTH

Related

What do you even call the ability of code to auto update and how do you do it?

I'm having a hard time understanding how to even search online for this behavior. I've seen it several times before and know it's something that can be done but don't know if this is a language level feature or what. What do you call the ability for code that you edited to automatically be applied to an executed instance of said code being run.
To use a common version of this that I see: you'll have a game that you're developing open and you'll be running that game in your engine and then edit a value (let's say one representing walking speed) and then simply save that file (maybe compile it? maybe just that line? I don't know how it's done) and then, suddenly, that behavior is updated in the live instance of the program just like that.
It seems so much better then having to recompile a file, or a whole project, and then run it to be able to test it. How do I do this kind of rapid iteration and what is it called? NOTE: the first time I saw this was with Clojure in emacs. Does that have something to do with it?
You may want to read about the Clojure REPL and also here.
"Hot Reloading" is related and is commonly used in UI development in the browser with ClojureScript:
Shadow CLJS
Figwheel Main

How to debug child project process in Visual Studio

I have a solution with two console applications. Application B is started by application A. I would like to debug both, but at least application B.
I have tried to configure as debug profile for application B to start executable A instead of itself, and I have set up application B to be the startup project. When I hit Run application A is started as expected, which in turn starts application B, however I still get the warning on my breakpoint in application B that it won't be hit because the source code is different. I have tried to set dependency of A from B, and also of B from A, but neither made any difference.
Update: However, attaching to the already running process B works as expected. This can be a workaround but a quite cumbersome one.
What can be done to get this right?
What can be done to get this right?
Please try to use the Child Process Debugging Power Tool which is also suitable for VS2019.
We can easily debug this child project with this extension by Debug-->Other Debug Targets-->Child Process Debugging Settings.(If you are debugging .NET code, you must choose to enable mixed mode debugging which means that you debug two different types of projects.)
In the pop-up page, check the box to open the startup child process debugging and click Save. After that, default debug will support all child processes.
Note that by default, the same debug engine settings are used as the parent process debug.
More information you could refer to this blog. Hope it could help you.

Stackdriver Debugger doesn't capture snapshots

I am using AppEngine, NodeJS (Standard), I have accepted the license agreements, and I am initializing the Debug Agent this way:
require('#google-cloud/debug-agent').start({ allowExpressions: true });
I can see all the logs for my application in the Logs Viewer, all the requests are here.
When opening the Stackdriver Debugger, it recognizes what is the current source code running, and displays it. I try adding a few snapshots and logpoints, as basic as this:
if (true) logpoint("Hello World!")
It is waiting for hits, but obviously missing them. There are also no logs related to my logpoints. However, I can see the standard logs outputted by my app. Everything seems to work except the Stackdriver Debugger, even though it doesn't seem to complain either.
I have looked at everything and made sure everything was set up properly but I am not sure how to "debug the debugger" further.
Is it actually even working, and people are using it with NodeJS in Standard mode?
What can I check? Any way I can see errors related to the Debugger itself?
Prior to the „request” statement, how did you set up your project in Stackdriver Debugger for node.js? You may check Setting Up Stackdriver Debugger for Node.js as reference.
To reproduce this issue, one needs confidential information, such as details of your project and sample code. It is much easier to protect your information in the Public Issue Tracker. You are encouraged to open a similar issue there.

VS 2015 won't break at breakpoint in web api project

I have a VS2015 solution with 2 C# projects. A WPF client, and a Web API server. I set a breakpoint in the Web API code. Then ran the WPF client in debug. The breakpoint icons in the source file changed from solid red dots to red circles. The debugger is not breaking at the breakpoints. What am I doing wrong?
You effectively have 2 applications and you're trying to debug both at the same time which won't work.
Make your API run in IIS then use a separate Visual Studio instance to attach debugging to that process ( you can find it running under w3wp ).
So you can do this effectively with 2 instances of Visual Studio, one for the client and one for the API.
You can also simply open the same solution with a second VS, and run the API from there then have the client hit the api on the same URL as the one being debugged. It is a bit strange to use 2 Visual Studio instances but it does the job quite well.
Use whichever method you're more comfortable with.
I'm not 100% sure, but I think it is probably because you are just debugging the client. I had the same difficulty getting to the code of a WCF service recently. As I understand it (and I'm no expert, so people who know better feel free to correct me if I'm wrong) basically Visual Studio won't peek into the server code while you are just debugging the client. I presume that when you run the client, you also have the server running at the same time?
I think the best way to deal with this is either to start your client, and then attach the VS debugger to the server process (see https://msdn.microsoft.com/en-us/library/3s68z0b3.aspx), or to run both the client and server programs at the same time when you start the debugger (https://msdn.microsoft.com/en-us/library/ms165413.aspx).
Hopefully this helps :)

Debugging startup issues in a C Windows Service

I'm trying to debug an issue that happens on service startup. Trying to attach while things are running is failing, windbg times out with an error about a link lock. I think that the error occurs before I have a chance to attach. A sleep might let me attach, but is there a more elegant solution?
I'd like to start up the debugger first thing as the service starts. C# has a Debugger.Launch() method to start a debugger at runtime. Is there an equivalent C call that can be used without .net? Something I could just drop in the start routine.
I can't call DebugBreak because at the time the service has started I'm not under a debugger.
Sleep is certainly a viable approach. It's crude yet effective. Somewhat less crude is to use a good logging framework to output diagnostics. With a sufficiently capable logging framework this can be very effective.

Resources