Is there a consistant way of navigating from a test in a Resharper test session to the feature file? When I double click a test in the session window most of the time it takes me the *.feature.cs and not the '*.feature'. However sometime this does work. Is this a bug? I found these things already:
How to navigate to feature file from resharper test session window in Visual Studio 2012?
https://resharper-support.jetbrains.com/hc/en-us/community/posts/206649425-Navigating-to-SpecFlow-Features-from-Test-Runner
But not much else. Is there some jedi/ninja trick I'm missing to get this to work the same way everytime, i.e. double click the test in the session window and go to the feature file
What you can do when it takes you to the generated code is to right click in the code, click navigate, then click related files, and you'll see the feature file there. A bit long winded I know but it works.
Related
I am writing Coded UI tests within Visual studios 2013 to automated some different tests for my company. As I was writing these tests, I was testing them and ensuring that they were working correctly (which they were). After leaving one day, and coming back into work the next, I noticed that my tests were not working as expected (as they were when i left that day). I am working on a local copy of the automated tests (so that rules out someone else breaking it) and the code version that I am testing of our software hasn't changed.
What I noticed was going wrong, was that whenever I would double click on an item (say a menu to open a part of a program) the double click would not register. If I record multiple times, recording different clicks (instead of just a double click), I can get the window to pop through automation eventually. But this is only convenient when creating new tests.
Has anyone ever noticed this happening and have a solution?
Thanks!
Interestingly enough.... I found the issue. Turns out that I guess I changed my mouse settings inside of windows, turning down the double click speed. This was what was causing the double click not to register inside of the application....
Hope it helps anyone with this problem in the future
I'm working on a web page as part of an ASP .Net application. When I include my JavaScript within a script node in the page I can set breakpoints in the JavaScript in Visual Studio and when I debug the project (which launches the page locally in IE) the breakpoint is successfully caught in Visual Studio and I can use it to inspect variables, step through, and do all the usual Visual Studio debugging stuff. However, when I move my JavaScript to a separate script file breakpoints stop working, and I see the message 'The breakpoint will not currently be hit. No symbols have been loaded for this document.'
I know I could take advantage of the browser's debugging tools but how do I get Visual Studio to hit breakpoints in a JavaScript file in an ASP .Net application?
It would also be good to understand why the breakpoint works when the JavaScript is included in a script node within the HTML page, and fails when it is moved to a separate JavaScript file?
Here are the steps:
1) First open Visual studio -> select your project in solution explorer.-> Right click and choose option "browse with" then set IE as default browser.
2) Now open IE. Go to,
Tools -> Internet option -> Advance -> uncheck the checkbox having "Disable Script Debugging (Internet Explorer) and then click Apply and OK and you are done.
3) Now you can set breakpoints in your JS file and then hit the debug button in VS.
I think the point I made in the question about having the JavaScript in the HTML file versus in a separate script file may have been misleading. It tried copying it back and it still did not work!
I have made two changes and now it is fixed (though I am not sure which one fixed it).
Firstly I checked the closing curly brackets on each function in my JavaScript (after reading robert4's answer to What can be the reasons for JavaScript breakpoint is not hit) and added a missing semi-colon after the function I'd recently added.
Secondly I held down the Ctrl key and clicked refresh in the IE launched by Visual Studio which should force a page reload (instead of loading from IE's cache).
I'm assuming that the second of these changes fixed things but I've included the first to just-in-case it proves useful.
Sometimes I get the message that the breakpoint will not be hit, and no symbols will be loaded.
The red icon in vs.net changes color, and the debug mode just doesn't work.
what is the reason for this?
You may be running your project in Release mode. If so, then switch to Debug mode
From Visual studio debugging issue with files of the same name by Philip Carney
Do each bullet in the link below ONE AT A TIME, but repeat my steps below with each one you try.
Stop debugging (press red square icon) in Visual Studio
Clean Solution
Build Solution
Tools > Attach to Process (or start with debugging)
Start the program that you're attaching to, and run it such that your code will get hit
If attaching to nunit.exe, then open NUnit and run a test so your breakpoint will be hit
If attaching to w3wp.exe (IIS site), then open your site in the browser and go to the page that will hit your breakpoint
for manage code only - theres a good answer for this problem on the following site:
http://geekswithblogs.net/dbutscher/archive/2007/06/26/113472.aspx
for native + managed code - in the startup solution properties-> Debug tab
make sure that "enable unmanaged code debugging" check box is checked
After trying several suggested fixes for this I did the following to get it working.
Right Clicked my Project in the Solution Explorer and selected "Properties".
Went to the "Web" section and made sure "Start Action" was set to "Current Page".
Spent 3 1/2 hours on that... I'm going to go get a drink now.
I resolved this problem by selecting Automatic:Native Code for the "Attach to" field in "Attach To Process" form
Next to the "Debug/Release" dropdown list, there is another one with "Any CPU/Configuration Manager...". Click "Configuration Manager...", and you will see some of your projects might be in Release mode. Change all of them to Debug.
This can happen if the symbol fiels are different from the assembly (remote debugging), or when there is no "direct path", so the assembly hasent been load, but might be loaded using reflection and loading of the required assembly at run time.
This can also happen if the debugger is not attached to the process for whatever reason. If it's the case, you can always go to Debug - Attach to Process... and choose the right process. Your breakpoints should return to normal once VS determines it can hit them.
What does it say when you hover the mouse over the disabled breakpoint? It will usually tell you the problem. My favorite is the old 'source code is out of date', especially when I'm debugging a DLL. Another favorite is when the file you're looking at isn't the one you're debugging (a copy in another folder?). If it's a case where you can breakpoint a caller routine, but not the callee, stepping into the callee will force VS to open the 'proper' source file and you'll be able to set breakpoints. Confusing, I usually swear at VS at this point, it seems to help.
I had the same problem. Which I know is normally if the build versions are different, and something isn't matching up. I cleaned my project, rebuilt it, and then deployed and that got everything back in-sync.
I do not like to play with knives but the only thing that worked for me involved editing the .csproj file itself. So, unload the project file, edit it by cutting and pasting the three asp.net files so that they are together in the ItemGroup. However, sometimes it is necessary to go further as explained here: http://carnotaurus.tumblr.com/post/4130422114/visual-studio-debugging-issue-with-files-of-the-same - Also, I give a list of other proposed solutions that did not work for me. I hope it helps.
I have tested with both deployed application and service, what I have found out that If the deployed code is different than a code in visual studio then breakpoint will not hit. Even small changes will affect and the breakpoint will not hit. So, It is better to debug the same version which is there on vs code and also in deploy application or service.
To fix this I had to re-create the virtual directory. I'm using Asp.Net 4.7 Framework and IIS Express. Went to Web project > property page > Web tab > clicked the "Create Virtual Directory" button next to Project Url textbox.
I forgot I had clicked this button in my "Main" branch, but then had switched to my "Sprint" branch. It kept running the "Main" code until I clicked "Create Virtual Directory" on my "Sprint" branch.
For me it was giving this because I haven't started the relevant project at start of application , it worked after I added project run on start
On Eclipse, whenever I double click a tab, it fills the workspace (by hiding all other views like project tree, console, etc).
Is there any way to do this on Visual Studio?
Note: i'm not looking for full screen, just want a way to declutter the workspace but still have access to menus.
Are you after this?
Set shortcuts for the Window.AutoHideAll function and for the Window.ResetWindowLayout function. In order for the ResetWindowLayout to work, you have to export your settings (make sure you select "All Settings") with all windows expanded and then import them again.
ResetWindowLayout will restore all windows to the way they were the last time you imported your settings.
Not with double click on tab, but you can do the same with Shift+Alt+Enter key combination.
This keyboard shorcut was changed to F11 from 1.9.1 vscode version.
All keyboard Shortcuts: https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf
I was looking for that, as well, and I now just got used to using full screen (Shift+Alt+Enter), which hides a little too much, which you seem to think, as well, but does in fact still show the menus.
Looks like drby got it on this one. Just FYI. I pinged the VS team to ask about this and here is the response:
"There is no way to reverse the command automatically. For it to work as a toggle we would need to save which toolwindows were auto hidden and which ones were not when the command was run, which we don’t do (it would cause lots of interesting persistence questions, across profiles and VS sessions)."
The idea of a "Unhide All" command is what I suggested. So if you hide all then you can unhide all as well. There might be some windows you don't want to unhide but the 1 or 2 extra windows is better than not having an unhide IMHO.
I still have to use the VB6 IDE.
Unfortunately every time I start the IDE one of the buttons of the toolbar disappears. Almost always it's the Run button which goes first. Sometimes also items from the menu bar or the context menus are missing.
I have to reset the toolbars almost every time I start the IDE (Which is quite often during a typical work day). Recently I bought an IDE plugin which modifies the menu bar and requires a restart after every reset of the menu bar. (Otherwise it would crash)
I could live with just the resetting, but the restart is really annoying.
Is there something I can do?
To solve this problem:
Unload all add-ins.
Right-click on a toolbar and select the Customize... menu.
For each toolbar click the Reset... button (6 times in total).
Reload the add-ins.
For me action 3 was enough.
cf. MZTools faq (thanks to Andrea Bonafini), but these steps are originally from MSDN
It sounds like you recently bought a bad add-in. Can you get your money back? Every time I've had problems with disappearing controls in the IDE it has been due to a bad add-in. You can find out which one it is by disabling them, one by one, each time using the IDE for a while, then re-enable it and disable the next one, until the problem stops.
I still use one problematic add-in. It exhibits behavior similar to yours in that it makes the run button disappear. I avoid the problem by only loading the add-in when I need it, use it (it formats code), then I immediately unload it. If you don't use the functionality of the add-in that often, this could be an acceptable workaround.
Yea, i have this same problem with one of the add-in. But if you reset it. Shut the IDE down and open it back up again without doing anything, the IDE shouuld be able to retain the previous clean setup.
It's just guest, but:
Each graphical element on IDE (like button) is kind of resource (i.e. GDI handle).
Maybe your VB app doesn't manage these resources good enough and after sometime VB IDE cannot redraw elements like buttons (run is used often).
Also, maybe some IDE add-in is in conflict with some other add-in/application and breaks something -- I have this problem with Clip-X and MZ-Tools.
I had a similar problem when I was setting up the IDE to use for the first time, though it may not be helpful if you've been using the same IDE for a while. When I first started using the IDE, I would modify the toolbars and then close the IDE. When prompted if I wanted to save the open file I always said No, since the file was just a dummy file I was using to open the IDE with. Turns out the IDE was saving the toolbar preferences with that file, so they never got saved.
Try opening a file, customizing the UI, saving the file, then closing without modifying the code. This was the solution for me.
I've tracked down the problem and as suggested it was an add-in.
The problem went away as soon as I disabled the Visual Basic 6 Resource Editor.
How to restore your VB6 IDE without reinstalling:
Run Regedit
Find the entry for Visual Basic 6.0
Export your settings in case things
go wrong
Delete the 'UI' setting
Run VB and you will have your popup
menus back
The 'Find' button disappeared from my VB6 toolbar forcing me to select the Edit menu to use Find. I had two add-ins enabled: vbCodePrint and ResourceEditor; so I did away with both of them, turned VB6 off and back on, then put both add-ins back in and my button returned.
If you're still using the VB6 IDE, and I do amongst others, then this problem is not likely to have gone away. I use VB6 in Windows 10, and the problem is still there. But it doesn't affect me anymore.
I have had this problem a few years into using VB5 and VB6. Today, if I start VB6 directly, it may work fine the first time, but buttons will go missing the second time -- ALWAYS.
My solution, which I developed from day one:
Do whatever needs to be done to restore all your buttons. Save the Visual Basic 6.0 registry settings to a file, as suggested previously, and only keep the UI entry. Sometimes, you have to exit VB6 for it to post changes to the registry. So if this doesn't work the first time, try exiting before saving the settings.
I use my own program to launch VB6, which automatically copies my VB6 registry backup back into the registry -- by calling "RegEdit.exe /S D:\VB\IDE_Fix.reg" -- before I launch the IDE . This works every single time, and requires no action on my part.
If you read this, that means you are a programmer. You can make this work by yourself.
Mike
Reinstall,clean registry and update with SPacks etc....