1
I have an ASP.NET application in c#, and I do some debugs(obvious) in Visual Studio, but I always have a problem with directories, because the Godaddy directory for example is different from the localhost directory, and I need to do some tests, how to know what certain variable is returning me when I put the application in the air, like:
Debug.WriteLine(Request.Url.AbsoluteUri)
get back to me http://localhost:54345/ in Visual Studio Output when I am in the IDE(localhost), but if I upo my site no longer have this control, I could even insert in an example view:
@Html.Raw(Request.Url.AbsoluteUri)
and "debug" but I believe it is not the right one to ask, the question is: There is a way to do this debug FROM INSIDE THE SERVER?
You can do it, but you can be sure you can’t do it using a server on godaddy
– Jéf Bueno
@LINQ Because of the shared server?
– Leonardo Bonetti
Exactly. They keep the servers very restricted.
– Jéf Bueno
Puts, I’ve had SEVERAL problems, from creating a Trigger in MYSQL, to increasing the Session time... and by the features I’ll need to add on the site I’ll have to migrate service. The cheap is getting expensive now.
– Leonardo Bonetti
Exactly. You can be sure you’ll have even more problems. It’s not wanting to do negative marketing, you even know it’s problematic.
– Jéf Bueno
I understand, if there’s a downside, we have to talk. But anyway, answering the question, I could see the output on a server that has this feature, or use another type of debug?
– Leonardo Bonetti
I don’t know, but take a look at that link. I’ve never used it, so I can’t say for sure.
– Jéf Bueno
I’ll read it, thank you !
– Leonardo Bonetti
And even if it was easy, it’s not recommended.
– Maniero
@bigown because it is not recommended ?
– Leonardo Bonetti
Because it’s easy to screw up, it needs a debugger code in production that’s a tragedy to do, you can control the environment and produce misleading results
– Maniero
@Bigown I understand and agree with you ! The idea of debugging was more to know what the difference/return of an "Httpcontext.Current.Request.Physicalapplicationpath" is still very confusing for me the differences in localhost and production.
– Leonardo Bonetti
@bigown The question half answered here, how to proceed? closing the same?
– Leonardo Bonetti
I don’t know, if you don’t think it’ll come any better, you can close it if you want.
– Maniero
I will wait for some more answers if there is, otherwise I close, but I already have a good idea. Thanks.
– Leonardo Bonetti
I do remote debugging in my application but use Azure, very easy https://medium.com/balta-io/debugging%C3%A7%C3%B5es-hospedada-no-Azure-app-service-com-visual-studio-ad514dec995f
– mcamara
It is possible yes, I do it where I work because we have development, homologation and production servers. Obviously we never Depuramos of production, but we of development and homologation do this. Briefly, we install Remote Debugger, open the Worker Processes list of the IIS server in question, find the Applicationpool process ID where the Site/Application is running, and make a Visual Studio Attach (there are a few more things to check out, but I only said the main points). But this requires server access, which doesn’t seem to be your case.
– Alisson
It’s personal, I won’t be able to do it ! Godaddy is VERY LIMITED, some use Zure, others have access to the server, everything I unfortunately don’t have for Godaddy... But thanks for the answers.
– Leonardo Bonetti