JetBrains Rider: How to attach to elevated permissions process running locally? - rider

I am using JetBrains Rider on Linux to debug some .NET core services. I have launched Rider without sudo permissions since my code source tree is all under my local user, but yet the installed services are running under root permissions.
Right now I'm in a predicament where in order to attach to the running processes, I have to launch a new Rider instance using sudo, but that then messes up the source code tree. Overall, this is a huge pain.
I would like to be able to attach to the elevated-permission service via an instance of Rider that is launched without sudo. I think the below is the way to do it: Run --> Attach to Remote Process, which brings up the below popup:
However, the problem with this popup is that if I click the arrow on root#localhost:22, then it shows no processes to attach to. Yet, the 4 processes are there that I would like to attach to (in the screenshot, they are 14949-14952). How can I get "no processes to attach to" to list the 4 processes in question? I have seen this done before by another developer, just think I'm missing something. Also, I'm 100% sure I know the root password.

Related

Deployment from within IntelliJ IDEA

Deployments from IDEA are possible, e.g. I can connect to remote server and I can upload a package. The deployment process I have involves a little bit more than just deploying a file on server.
Once the file is uploaded I need to run certain commands to complete the deployment which mean I need to connect to the server and run those commands one by one and I am looking to do that through one click from the IntelliJ IDEA.
Is that possible?
This is how the project directory looks like:
This is how I am trying to setup deployment:
if you click on that little "Fix" button that's what I see
Even if I try to remove the unwanted entries they come back and never go away.
Finally this is what my project structure looks like in idea
Yes, you can use Remote SSH External tools. Make a script that will run your commands, deploy it to the server as well, then run this script remotely via a tool.
In the Run/Debug configuration Before Launch steps you can add your remote external tool to run automatically.
You can find some more details in my another answer.

Adding software setup to installer

I'm writing an installer for an application. Most of the installer is done and working, but I have on more step outstanding. I need some way to add a setup window to the installer, that will take user input like server address and port, etc. and write these to the relevant files for system start-up. This preferably done through a GUI of sorts inside the installer.
I've tried creating an executable file that runs after installation, but this does not always execute on different systems.
Is there a way to add a GUI to the installer itself that executes after the directory structures and files have been put into place?
Thanks in advance.
In general you should seriously consider doing this as a standalone app that runs when the app first runs and needs configuring. Then it's a program that runs in a user context and can be tested and debugged in the normal way. At least consider what the user is going to do if they want to change the server address or the port - will they need to uninstall your app and reinstall it just to change the server details or the port?
The GUI may not run correctly when started from the install for a number of reasons. It may be initiated with the system account if it's a deferred CA. It wasn't started from the interactive user shell, so it probably won't have any idea of a working directory. It's being run from an msiexec.exe process running in the system directory and maybe with a system account - that's not really the place to be doing your GUI configuration.
I assume you're using WiX, it doesn't say so in your question but it's tagged with WiX.
I would have a read of http://wix.tramontana.co.hu/tutorial/user-interface-revisited (or http://www.dizzymonkeydesign.com/blog/misc/adding-and-customizing-dlgs-in-wix-3/ has a relatively easy to read example), you can add or edit any of the dialogue boxes in the installer, you'll need to download the source to get at the built in dialog, and it does require some "play" to get everything quite right but worth it to get a professional looking installer.

go install on windows: "Access is Denied"

I am new to programming in Go. I would really like your help regarding one of my problems.
I am required to do go install on a file, the executable of which (in Windows) is created in a folder called GOPATH\bin.
Until now, I typically followed the routine: go install <file>.go ---> <file>.exe.
However, this time it appears that after the execution of <file>.exe, the exe doesn't finish complete executing for a while and I get the following error when I go install again.
C:\Users\Rahul\Desktop\Compilers\src\cs553s2013\mylexer>go install
is_digit.go go install command-line-arguments: open
C:\Users\Rahul\Desktop\Compilers\bin\is_ digit.exe: Access is denied.
See http://grokbase.com/t/gg/golang-nuts/135fyje5d9/go-nuts-go-build-access-is-denied-windows-7x64
Absolutely no idea why, but the above suggestion worked. One must enable the "Application Experience" windows service on Windows 7 to solve this issue.
I had this service disabled, and was seeing a similar strange 2-3 minute time of "Permission Denied" on my project's binary (the binary would also disappear after a refresh via alt+F2 of $GOPATH/bin, from a Windows Explorer view of the $GOPATH/bin where Eclipse + Goclipse was building my binary). I noticed that just after execution, and before the binary finally disappeared, it was changed to be owned by some unknown user (in Explorer, it isn't owned by the compiling user, Administrator, or even SYSTEM).
I can only speculate -- perhaps Windows keeps any .exe on the filesystem, if it has exited without some sort of undocumented 'all-OK' status to the windows kernel, assuming it 'crashed', so the Application Experience service can send it as diagnostic data to Microsoft -- and if that service is disabled, the Application Experience service can't finalize whatever handshake NTFS or Explorer is waiting for to allow the file to be overwritten by subsequent compiles. So the golang .exe sits there, with elevated permissions, with some system/undefined user, un-deleteable by Eclipse, until Explorer does something to mark it as definitely dead.

How to attach to WWAHOST from Visual Studio 11

If I F5 a Windows 8 JavaScript app and look at the processes pane in VS11, I see that it's WWAHOST.exe that I'm attached to. Is it possible to attach to this after the fact using Debug | Attach to Process? I don't see it in the process list even when I show processes from all users. I see the same thing whether I run locally or in the Simulator. Thanks.
There are effectively two ways to do this. Delay starting the app and attaching the app. You will need to install the remote debugger from Microsoft. As of this writing, it is located on http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=28973
Detailed steps plus explanations are here.
Summary:
Install VS remote tools
On start menu, launch "Debuggable Package Manager" (powershell will start)
using powershell: get-appxpackage (to locate your package)
using powershell: enable-appxdebug PackageFullName
Launch application
Attach to the correct wwahost.exe for your application.
Debugging Topics Located here.

unable to build ant with Clearcase on VMware

So here is the problem.
I have a local snapshot in my local windows system and i run my ant script and it builds.
I have build system which is also winxp but its a vmware built inside ubuntu. i have also a snapshot there too in winxp , and my script runs against this. But clearcase doesnt allow to write anything on this folder and build fails. Tried and tired of changing everything thats possible.
I did try one more option, like copying snapshot from my local windows system to vmware winxp and run it from there, and it works cool. Coz clearcase doesnt hold any lock. Unable to figure out how to fix this.
Any thoughts friends ?.
ClearCase shouldn't prevent the creation of private files in a snapshot view.
A snapshot view is like a SVN workspace: a collection if files copied on the hard-drive (as opposed to dynamic views which allows for network-access to the same elements)
So I suspect your script fails when it tries to checkout and/or "add to source control" elements.
I which case you need to make sure of the:
user characteristics (CLEARCASE_PRIMARY_GROUP)
view protect ("cleartool lsview -l -full -pro")
If you have those informations, plus any specific error message, you can add them to your question and leave a comment on this answer. I will then update it accordingly.