I have Windows 8 Consumer Preview and VS2011 Ultimate, not Express. All I want to do is stop at a breakpoint in the default.js script file. I created a project from the Split layout template and just ran it. My javascript debugger console says:
Visual Studio is not currently attached to a script debug target that
supports browser diagnostics.
I am in debug mode, with Script only debugging configuration. I cannot get any project, including the samples from MSDN to JS debug. Has anyone else had this issue?
The lifecycle of any Metro APP is controlled by the PLM. Whenever a metro app is waiting for a user action the PLM suspends it after a certain timeout. So normal debugging tools may not be useful with the PLM controlling the life cycle of the app. Check this for a detailed description
Related
I'm making a WinUI3 app in Visual Studio, and I'd like to open a file when I start debugging, so that activatedEventArgs.Kind == ExtendedActivationKind.File as per this.
I'm really struggling to turn anything up with google, so am making a question here to help the next person.
Assuming that you already registered your file type (by following the steps in the link you provided) and your target app is already deployed (when run on VS),
you can debug it this way:
In VS, go to Debug > Other Debug Targets > Debug Installed Debug Package...
Select your app in Installed App Packages.
Select Managed(.NET Core, .NET 5+) in Debug this code type.
Check Do not launch, but debug my code when it starts.
Click Start. (The debugger starts running without launching your app.)
Double-click your target file. (Your app launches and the VS attaches the debugger to you app).
In Visual Studio 2010,
I want to debug two web applications running on IIS at the same time.
When debugging the first application it is ok. But when starting to debug the second application and first program is still in debug mode, Visual Studio prompts:
unable to start debugging on the web server. a debugger is already
attached
How can I solve this problem?
To summarize, one has to set different application pools in IIS for the two applications to debug.
Here is a rough instruction, given that both applications have been deployed to IIS once within Visual Studio.
Open the Internet Information Services (IIS) Manager
Click Application Pools on the left pane
On the right pane add another integrated application pool, let's name it Second ASP.NET 4.0 Integrated
For one application, open the Advanced Settings...
In the properties view finally select Second ASP.NET 4.0 Integrated as the application pool
This way the applications should be debuggable in parallel because each Application Pool spawns a new operating system process to which a separate debugger can be attached.
A windows process can only have one debugger attached to it at a given time. If you get that message it means that you're attempting to debug the same process twice which won't work. But that also means you should be able to debug both web applications in the instance of Visual Studio that's already attached. It may require a few extra steps though to get it to acknowledge the other code
Disable "Just My Code" (Tools -> Options -> Debugger, uncheck "Enable Just My Code"
You may need to manually load symbols for the other web application through the modules window (Debugger -> Windows -> Modules)
After that though (second step may not be necessary) you should be able to set break points in both web applications and otherwise debug them.
I have made a Silverlight application that can be started with deep links. My problem is that I need to debug when I try to open the application in another tab with a deep link.
I use VS 2010.
Thanks.
If the piece of code you trying to debug executes immediately upon opening the tab you could try to defer the execution by adding a delay that would allow you to use Visual Studio's Debug -> Attach to process functionality.
I see that with the 'Attach to Process', one can debug the process by setting up break point in Visual Studio IDE.
I think it's pretty cool, and I'm curious what's the mechanism that enables it. I also found that gdb and Mac's Xcode supports the technology.
Q1 : Can anyone explain how does this work? How can the process mapped to a breakpoint in an IDE or gdb environment?
Q2 : Are there other compiler/debugger options than /Zi or -g (adding debug info)?
Q3 : Is this the way to debug dll (dynamic library)?
ADDED
I found this one with MSDN - http://msdn.microsoft.com/en-us/library/c6wf8e4z.aspx
The most common scenario I know of is using a browser to debug web code. In these cases, you start Visual Studio in debug mode and then attach to the browser and call the page in question. When the page is called it starts running the code in the debugger. Essentially, the debugger watches the process and when it hits code in VS, it starts debugging.
The same is true with other applications that are calling code you are running in Visual Studio. When you cross the boundary to the code, the debugger catches the call and starts running code in VS.
I use it fairly frequently when developing plugins for existing applications (Maya, Reaper, etc). As a general rule, plugins can't be run independently, so in order to debug them I have to run the host program and use "Attach to Process" to run the debugger on my plugin, at which point I can set breakpoints and all that other debugging goodness. You need to have debugging symbols and al that for the plugin, but you don't need to have them for the host application.
i try to debug a windows gadget. Just-In-Time debugging fires up and i can see an VS2010IDE attached to the sidebar process. But there is no source code to debug! Only a blank file with the yellow debug pointer. What is my problem?
Configuration of my system is based on this article:
Gadgets for Windows Sidebar Debugging (http://msdn.microsoft.com/en-us/library/bb456467(VS.85).aspx)
We have posted on the MSDN forum about this.
I think script debugging is broken in studio 2010 beta2.
I cannot get script debugging to work on my ASP.NET MVC project either.
We get a blank page, and the IDE cannot find the code to debug.
Trying to open files in the Internet Explorer tree in solution exlorer results in blank files being opened.
I think it's a bug - and afterall it is a beta.
I also had this problem, and for a while I was thinking it might have to do with my machine being 64-bit, or a permissions issue, but I have no way of confirming it.
However, I was able to solve it by using the template on this Code Project site:
http://www.codeproject.com/KB/gadgets/HeterodoxGadgetTemplate.aspx
The nice thing about the template is that it's setup as a Windows application. When you run the app it handles the local deployment of your gadget and starts the sidebar service (sidebar.exe). I believe this probably gets around a number of permissions issues.
After setting up a new project using this template, I was able to successfully debug the JavaScript using the "debugger" methods explained everywhere else (for example: http://msdn.microsoft.com/en-us/library/bb456467%28v=vs.85%29.aspx).