IntelliJ Grails view always dissapearing - grails

When I open my grails project I always get something like this:
http://imgur.com/SK4ybSm
Then to get to "grails view" I have to click it, then double click on my project root and then View --> Tools Windows --> Grails View to get this:
http://imgur.com/SYyZvdj
Anyone knows how to fix this, so I don't have to do this every time ?

It appears to be a bug since other modes of the project view do persist, I've submitted it to YouTrack, please follow for updates:
IDEA-168623 Grails mode of the Project View doesn't persist

Related

ASP.NET MVC with Bootstrap 3 Not Rendering correctly

I'm using Visual Studio 2013 RC to create a new ASP.NET MVC project. Running the sample generated by the template works as expected. When I update bootsrap to the latest version (3) and rerun the application, my navigation bar is not rendering correctly. It's basically collapsed with just the "Application Name" link and icon in the upper left corner. If I click on it, then the menu appears, but only vertically. Something clearly wrong. Anyone else seeing this behavior?
The structure of many items - including the navbar - has changed from Bootstrap 2 to 3. If you just start applying the v3 CSS to the v2 code, things are bound to go heywire.
I would start with checking out the Bootstrap 3 docs for the navbar (http://getbootstrap.com/components/#navbar) and update your HTML accordingly. Then see if you are still having an issue.
Thanks everyone for the feedback/discussion. This was indeed helpful. For the benefit of the discussion, I found this post to be spot on in getting my MVC project updated to Bootstrap 3. This is only temporary though. Once VS RTM's, this shouldn't be an issue.

Get "object reference not set to an instance of an object" when run Page Inspector on MVC app in Visual Studio 2012

When I try to run an MVC web application in Page Inspector mode I get the error "Object reference not set to an instance of an object" and the app just hangs.
Microsoft has noted that it's a bug but doesn't say when they'll fix it.
Anybody have a workaround?
Thanks!
I was also seeing the object reference error, did some research and found this thread on Asp.net.
In the 3rd post down the user states that they installed Visual Studio 2012 Web Express to clear up the error. I installed this and now Page Inspector is working just fine in my mixed project.
Check the address bar in Page Inspector to see what parameters are being used, possibly your page doesn't render with the given URL. Also ensure that Visual Studio has the latest updates.
As a workaround you could try adjusting the URL in Page Inspector, so that your controller will pass data to the view that you know is working correctly.
Based on http://msdn.microsoft.com/en-us/vs11trainingcourse_pageinspector_topic2.aspx?ppud=4 I believe the problem is:
The Page Inspector window will show the /Home/Index URL mapped to the source View you selected.
We changed our routing away from /Home/Index a long time ago. If I create a new Web application, which has a /Home/Index page, then Page Inspector works fine.
So, long story short, always make sure you have a /Home/Index page, even if it's an orphan, if you want to use Page Inspector. Hopefully Microsoft will fix this bug soon.

Issue running MVC project while editing a View

To put it simple, whenever i run (debug) my MVC project while focusing a View (in the editor window) on Visual Studio 2012, the web page shown on the browser is the View itself rather than the actual landing page.
For example:
If my usual landing page is the following:
http://localhost:53338/
Then if i'm focusing the 'Add' View and I Run my project, it sends me here:
http://localhost:53338/Views/Products/Add.cshtml
Any idea how to 'fix' this?
Thanks in advance
Your web debug configurations are set to run the "Current Page".
Here are the steps on how to solve it:
Go to the project's Properties (Right-Click on the project -> Click on Properties).
Go to the Web tab.
Select the Start URL radio button and leave the address text-box blank.
In the Project URL type: http://localhost:[portNumber]/
Good luck

annoying Grails console view in IntelliJ

When developing a Grail app in IntelliJ there's a console view:
Whenever I make changes to the app outside IntelliJ, this view grabs the focus and lots of building messages start appearing. This also happens on occasions when making changes within the IDE.
I would like to hide, delete, disable or remove this view if possible?
(FYI, this view has nothing to do with the Grails console that appears when you run the grails console command)
You can't disable it in the current version, however this problem will be addressed in the future builds, our developers are aware of it. Sorry for the inconvenience.

Cannot put breakpoint in an ASP.NET MVC view when running in IIS7

I'm forced to use IIS7 because Casini is only x86 and we are running with x64 ELMAH.
Something I've noticed since I've switched is that I cannot set breakpoints in ASP.NET MVC views anymore. I'm not totally sure it's because of IIS7, is it? Does it happen to you as well?
The Visual Studio (2008) project is configured to use the local IIS7. I normally run the project by pressing F5, which actually doesn't run anything. It compiles the code and attaches itself to the corresponding IIS7 process.
The limitation of breakpoints is very hard into my environment now. If I right click a piece of code in a view there's a "Breakpoint" sub-menu, like before, with the Insert Breakpoint. But when I try to insert a breakpoint I get a blue message at the bottom of Visual Studio saying:
This is not a valid location for a breakpoint.
and no breakpoint is set. Setting breakpoints in the compiled code, like the controller presents no problem.
Is there any way to solve put a breakpoint in the view?
You need to make sure you are breaking on something that is actually server side!
You obviously won't be able to break on:
<h2>Title<h2>
And perhaps surprisingly, you can't break on:
#SomeCode here
But you can break on:
#{
SomeCodeHere
}
You can try attaching the process (Ctrl+Alt+P) to w3wp.exe and running it from there. If there are more than one w3wp.exe process running, consider using the tips from InfoPath MSDN blog.
That said, being "forced to use IIS7" over Cassini is like being forced to choose ice cream over raw sewage.
Try running VS as the administrator, I ran into this problem trying to attach to the IIS7 w3wp.exe. I started mine as admin and has worked just fine.
I had the same issue then I installed ASP.NET 5 RC1 Update 1, things got worst.
I solved the problem deleting the ComponentModelCache folder out of the %appdatalocal%/Microsoft/VisualStudio/14.0 folder.
Can you set break points anywhere else in your code?
I've never personally set a break point in one of my views, have you tried setting the break point in the controller on the line which returns the view and then tried stepping into the view from there?
What are your trying to debug in your view? It should be kept clean and simple with no logic. That is why I've never needed to debug one.
Enable line numbers for HTML here
Tool -> Options -> Text Editor -> HTML -> General

Resources