Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Debugging in InterDev 4

Status
Not open for further replies.

novasoy

Programmer
May 8, 2002
12
0
0
US
I'm working on a project with both Client and Server code that I want to debug. I have IIS set to debug both, yet I can only seem to debug Client code. Right now I really, really need to debug server-side code. Please help. All this is in visual studio 6 on Windows 2000 Pro.

 
Are you in Master or Local mode? In order to debug, I believe you must be in Local mode.

-----------------------------------------------------------------------------------------------------
"If you can't explain something to a six-year-old, you really don't understand it yourself."
-- Albert Einstein
 
Thank you for responding. I am in local mode. I do all my development at my workstation, a Win2k machine with IIS running, and when ready to move to test, I copy the files to the appropriate directory on our intranet test web server.

 
Is IIS on the remote server setup to allow for debugging? Or are you trying to debug on the remote server? Based on your posts, it seems that you are attempting to test/debug on the server, not on your development machine. If you are doing this, then you need to verify that the remote machine is setup for remote debugging. For information on this, check out this MSDN article:


I will add that I have a similar setup. I do development on my local machine, which includes testing and debugging, and then move everything over to a QA server to ensure that everything will work in that environment for a subsequent move to production. If this is similar to your situation, can you not do testing and debugging on your development system (so you needn't worry about remote debugging)? (If you try to do debugging on a remote server, then it doesn't matter what your local IIS configuration is, you have to make sure the remote server is configured correctly, and my experience has been that most server admins don't like to allow debugging on their servers.) Hope this helps. If not, post back with more info and we'll see what we can do from there.

-----------------------------------------------------------------------------------------------------
"If you can't explain something to a six-year-old, you really don't understand it yourself."
-- Albert Einstein
 
No, I don't debug remotely. I have IIS on my development machine like you do. I code and debug on my desktop box and then copy the files over to the server to do more robust testing with my users. Basically, I code stuff and run it to see whether it works or not on my box (local.) And then I move it to the formal "test environment" where my testers and boss QA it. Where I work it would be too much of a hassle to work with the sysadmins to set up IIS to debug remotely. :) Thank you for your response.

BTW, I should add that InterDev is debugging my client code perfectly. It's the server-side code I need to debug and that's what isn't working. Breakpoints in the server code aren't even being triggered.

 
Novasoy,

The link that I posted above also contains information that will help to ensure that you have your environment setup correctly to do debugging on your local machine. You might peruse through those section(s) just to ensure that everything is how it should be. Incidentally, when I was having problems with my setup in the past, my problem was the exact opposite of yours. I could debug the server-side code, it was the client-side that always gave me fits... Go figure...

There used to be a post here that I could reference, but it appears to be gone now... I'll see if I can find my hard copy and post some of the suggestions that were there... I do remember that it had something to do with checking all of the various pieces of configuration because that is usually where the error lies... I'll let you know if I find it.

-----------------------------------------------------------------------------------------------------
"If you can't explain something to a six-year-old, you really don't understand it yourself."
-- Albert Einstein
 
I followed the instructions on the microsoft website explicitly, and now it's worse than ever. Now I get errors that say it cannot attach to my machine and failed to launch such and such application. *sigh* I'm thinking about just reinstalling interdev and the server stuff. It appears that I am debugging remotely, even though I want to debug locally. It's all fouled up. It doesn't help that microsoft's documentation is old. I am on IIS 5 and I've installed SP5 for Visual Studio. All the documentation assumes you haven't.

Am I off base, or should this not be so hard?

 
Personally, I think it should not be this hard. I remember when I was having issues with this that my problem had to do with the setup of IIS. I had to go into the default site of IIS and set the following (which would affect all apps I was working on in that default directory, but that was fine as I only had one - otherwise, just use the app you're working with):

- On the directory tab set Application Protection to High (Isolated)
- Click the Configuration button and go to the App Debugging tab. Be sure "Enable ASP Server-side debugging" and "Enable ASP Client-side debugging" are checked. Click OK and return to Directory tab.
- Click on the "Unload" button if not already greyed out, then OK.
-Then open Component Services and find the website's COM+ package that I was working on.
- Right-click and choose properties, on the identity tab, be sure Interactive User is checked, then OK.
- Right-click again and then choose Shut Down, then same and choose Start to restart it.

This (I believe) was what got me up and working. Something else to bear in mind - when you're in Interdev and you click on that right arrow to begin the debug process, check the processes that are being debugged (click on Debug, then Processes). In that box, you should have listed DLLHOST.exe and the IE window (presuming you are using IE) you just opened. If not, then there is a problem. Try that and let me know what you see. (Again, it shouldn't be this hard in my opinion...)

-----------------------------------------------------------------------------------------------------
"If you can't explain something to a six-year-old, you really don't understand it yourself."
-- Albert Einstein
 
I did what you suggested explicitly, both in component services and in internet services manager. Then I went to InterDev and tried to run my application in debugging mode. Still nothing. I first get a error message that says "Cannot attach to machine 'localhost'. Do you want to continue anyway?" and then (when I click YES) "Application '' failed to launch."

Frustrating.

By the way, I really appreciate you trying to help. I've been marking your posts up, but I wanted to also say thanks.

 
In Interdev, click on Project -> Web Project -> Web Permissions. On the Settings tab, is Use Same Permissions as the root Web server checked? If so, then you need to ensure that you have set the c:\Inetpub\ directory in IIS to also allow for debugging (the second option in my most recent post). I remember having a problem with this previously b/c I had set the local app to allow for debugging but, b/c of the permissions, did not have it set that way for the master app/site.

As for the error message, "Cannot attach to localhost", this sounds like it cannot even find the localhost - unfortunately, I've not run into this problem before and am at something of an immediate loss as to why this would occur. Best I can guess is that there is some other (unrelated?) problem with the IIS setup and Interdev trying to connect to it. Are you still able to open up your project like normal? Just as a guess, are you able to setup a new project (which I believe would need you to be able to connect to the localhost)? Not sure of what else it might be at the moment... Worst comes to worst, you may have to uninstall and reinstall, but I cannot help thinking there is an issue with the setup of IIS somewhere... I just had another thought, but now it's flown out of my head just as fast so I'll see if I can track it down and nail it onto a couple of slow-moving neurons... ;-)

You're more than welcome. I'm sorry that we haven't been able to track the problem down just yet. But that is what these forums are for. Goodness knows I've had lots of help from other users, so it's my turn to return the favor(s) - if I can - for others...

For now, hold off on uninstalling and reinstalling just yet. I'm just thinking that the issue lies in IIS somewhere...

-----------------------------------------------------------------------------------------------------
"If you can't explain something to a six-year-old, you really don't understand it yourself."
-- Albert Einstein
 
I checked the setting you mentioned in paragraph 1 and it is set correctly.

Localhost is running. If I open a browser and navigate to the application comes up. It seems to execute correctly.

As an experiment, I created a fresh web project in InterDev. I was allowed to create it and everything. I created a basic page with a simple script on it that displayed the current time. I started it. It said the server was not set up for debugging, and did I want to set it up to debug. I said yes, and then it gave me that same annoying message and would not run in the debugger. I did nothing in IIS to create or alter the directory. This adds weight to your argument that it has to do with the way IIS is set up, I'd say.

 
Looking at the printout I have of the earlier link to the Microsoft site I gave you earlier, it says that if it cannot attach to the machine (in your case, localhost), it indicates that the user does not have proper permissions to the machine. Are you sure that your account has those permissions?

-----------------------------------------------------------------------------------------------------
"If you can't explain something to a six-year-old, you really don't understand it yourself."
-- Albert Einstein
 
I messed around with that quite a bit yesterday until I gave literally Everyone access to the Debugger Users group. The interactive users, anonymous internet users, everyone is a member of the Debugger user group. I just confirmed that to be sure.



 
Ok, let me do a little more research and see if I can come up with anything. May not be today, though, as I've got some other problems here at the office... Sorry, will try to get back to you as soon as I can...

-----------------------------------------------------------------------------------------------------
"If you can't explain something to a six-year-old, you really don't understand it yourself."
-- Albert Einstein
 
Here's a few more things to check out:

Thread117-182022 (looks like they were having issues with debug/application failing to launch)
(This one may be of particular import since it covers some of the user permission issues if indeed the issue lies there.)

Let me know how these work out. Keeping fingers crossed...

-----------------------------------------------------------------------------------------------------
"If you can't explain something to a six-year-old, you really don't understand it yourself."
-- Albert Einstein
 
At long last, after trying a hundred different things, I reinstalled InterDev Server, Frontpage Extensions, and Debugger Manager from the Visual Studio CDs, and everything works now.

Thanks Chopstik for your help. I hope the long tale of this journey helps someone else in a similar predicament.

 
Hi,

The problem should be with the Catalog Class.
If you run dcomcnfg and don´t see the Catalog Class then your IIS server components aren´t well installed.

The simples way to solve this is to run the IIS Server Components setup. You can find it, for instance, on the second disk of Visual Studio 6.0, inside VID_SS folder.

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top