Visual Studio 2022 find the next line of code to execute - asp.net-mvc

I am learning a new ASP.NET MVC app that uses some approaches I am not used to / familiar with. Without having to deal with the client side scripts (because there appear to be over a thousand), I want Visual Studio to go into break mode / stop at the first line of code executed on the server.
Is there a way to do that?
For example, I click a button in the web site that run a script that shows a dialog box (I don't believe any server code has executed at this point in this series of events). Then I fill in some fields and click a button in the dialog box that I know sends data back to the server. I want the sever to stop at the first line of code it attempts to execute as a result of the button being clicked.
I thought you used to be able to put the app in Break mode, then you could use the Step Into button to take you to the next line of code but this no longer seems to work.
Any ideas?

You can use my Runtime Flow tool to find out what code is executed on the server when you click a button in the web site. Though you need to manually configure Runtime Flow to monitor your web application as described here https://vlasovstudio.com/runtime-flow/documentation/quick_start.html

Related

Internet explorer started from WScript.exe will not on appear on top

We have recently added a new feature on our application to be able to shell out to another application. One of the commands is WScript.exe
In one part of the script, I wanted to be able to show a dialogue, so I create an instance of Internet Explorer, inject my html, and then wait for a hidden input element to be updated.
The windows scripting file (containing VBS) then calls
Dim explorer
Set explorer = WScript.CreateObject("InternetExplorer.Application")
explorer.StatusBar = 0
explorer.ToolBar = 0
explorer.Navigate "about:blank"
Dim document
Set document = explorer.Document
document.open
document.write html
document.close
explorer.Visible = True
Do
WScript.Sleep 250
Loop Until document.getElementById("myValue") <> ""
This seems to work fine when I am debugging my main application. But when I run the application outside the debugger, the dialogue appears behind the application.
I believe that the problem is explained in the answer to this item:
WScript.Shell AppActivate doesn't work every time
Essentially, this was working because I was developing this in debug mode. When out of debug mode, the instance of iexplore.exe was not directly started by wscript.exe - the iexplore.exe process is actually started by an instance of svchost.exe. This meant that the implicit SetForegroundWindow() does not work.
Can anyone suggest a way I can put this internet explorer windows in the foreground?
Or is there another way I can create a dialogue, without having to distribute any more components?

Visual Studio 2015 and IIS Express-IIS creates duplicate website after error

I am having a weird error when it comes to one of my projects in visual studio. I can start to debug, but when I run into an error or Visual Studio needs time to create a data tip my IIS express instance is lost and it will create a duplicate. After this happens and I try to hit the page again my browser will try to connect but will never get a response. I have tried to stop debugging and then start back up, but the IIS instance persists and I get the same result, trying to connect but no response. Also all of my break points turn to the not able to hit symbol.The only way to get back to being able to debug is to close visual studio and open it back up again. I'm sorry I don't have anymore information, but it almost seems to happen randomly.
Thanks in advance
Edit
This is what the break point looks like after I have stopped and restarted debugging.
I end up finding out the issue for anyone having the same problem. My initial question was not exactly what was happening. Whenever I stopped the IIS instance, the port that I was running the server on was being taken over by a Microsoft process. So when I hit run again my process was blocked and then showing the error above.
In order to fix this issue. I had to change the virtual directory for the project. You can do so by clicking in the web project and selecting properties. Pick Web on the left hand side and then change the url with to contain a different port and then click on create virtual directory.

Detecting Quick Access command state

We have an application that is using Windows Ribbon Framework for an UI. The app itself is written in Delphi and uses Windows Ribbon Framework for Delphi to interface with the ribbon API.
Our ribbon XML places few commands into the Quick Access toolbar. Use can then remove/add commands either by using the built-in ribbon mechanism (selecting the drop/down button and clicking on a command name) or by selecting More commands command which opens the configuration dialog.
The problem I've encountered is that I cannot find a way to get the current state of commands in the QA collection (whether they are visible or not).
In the example above (picture) I would like to detect that first five commands are checked and that the last is not so I can prepare the configuration dialog accordingly.
I have no problems enumerating the IUICollection and accessing the items stored inside. I can also get the UI_PKEY_CommandId for each item. I cannot, however, find a way to read the checked/unchecked state. I tried reading UI_PKEY_BooleanValue and UI_PKEY_Enabled for all items in the collection, but they do not return that state.
I have also tried to monitor IUICommandHandler.UpdateProperty but it doesn't get called when such item is checked/unchecked (except that it is called with the UI_PKEY_Label key).
Does ribbon API even support this functionality?

Is Start (Dart framework) autoreload on the server side?

Is start (Dart server side framework) auto-refresh when one of our source code changed (just like PHP)?
Is bulls_eye, bloodless and express too?
or if they are not, is there any Dart server side framework that able to do that (edit code, then test on the browser, without needing to restart the dart/server program)?
Currently this is not yet possible in Dart. If you change the code you have to restart the app.
I wouldn't expect this to work anytime soon.
A main feature to make this possible is to manipulate the code at runtime. This is planned but as far as I know not yet started.
EDIT
The above mentioned feature is necessary when you want code to be updated without loosing the current state of the application but that is usually not so important on the server because it should be (mostly) stateless anyway.
In Dart there's no need to restart the server app when only the client part changes.
If you really just want to restart the entire server when the code changes you should be able to do that by yourself. Create a console app that loads the server app into an isolate (spawnUri) and watch the source directory for file changes. In the case of a file change shutdown the server-app-isolate and create a new one.

Using Toolbar to submit SAS code from Editor

When submitting SAS code via the SAS Toolbar (eg cmjohns response) the compiler knows that the code is being "DM'd" and will not run certain code (eg %window).
Is there a way to trick SAS into believing that code submitted from the Toolbar is coming from the Editor, therefore allowing interfaces (using %window) to be triggered via point and click?
It isn't super clean, but this will do it. The only downside is a program editor window will be open after it runs. There's probably a way to close it when it's done but I don't know what that is off hand.
pgm; clear;include "C:\path\code.sas"; submit;
Basically, this says to open a new program editor window and make sure no other code is in it, then include the contents of code.sas into the editor, then submit all the code that's in the program editor.
As a side note, in addition to a toolbar button, I think you could map a function key to a command like this as well. Press F9 to pull up the current mapping. There is a limit to the length of the command mapped to a key though so no long paths.

Resources