#VS Code issue but works in ISE

1 messages ยท Page 1 of 1 (latest)

weak sentinel
#

I notice that my default working directory in ISE is C:\WINDOWS\system32 and VSCode is C:\Users\myuser
but I mean I'm launching as administrator and I don't know how else to fix this

tawny flint
#

I would not run VSCode as administrator, personally. It would mean any extensions you use ran as administrator too, and I don't trust them that much.

#

But in vscode, normally, you would have your default working directory be the folder you're working from.

muted furnace
fluid lantern
#

The original post (now deleted) was about an assembly load problem in vscode. The admin stuff was just extra info about how they were running things

muted furnace
#

I see.

weak sentinel
#

sorry I had resolved the problem shortly after posting and thought I had deleted everything

weak sentinel
fluid lantern
#

you cannot, you need to launch the process as admin

tawny flint
#

I wouldn't do administration from vscode, that's all

agile moss
tawny flint
#

Maybe, but I'm not sure what the point would be?

agile moss
tawny flint
#

Sure, but how does being in Code help you admin, vs being in Terminal?

fluid lantern
#

testing a script that requires admin

agile moss
#

more importantly debugging one ๐Ÿ™‚

#

I mean yeah sure you can terminal debug like a wizard but why not have the full power?

tawny flint
#

Fair enough. I'm out of touch out here in cloud/k8s land -- almost the only thing I do elevated is choco upgrade all

fluid lantern
#

I will agree that making it admin always is wrong though ๐Ÿ™‚

tawny flint
#

I'd still avoid using vs code as admin, just like I always avoided running VS as admin when I was a .NET dev ๐Ÿ˜‰

#

sometimes you have to, fair enough -- but yeah, in VS Code, I would definitely use a special profile with reduced extensions

agile moss
# tawny flint I'd still avoid using vs code as admin, just like I always avoided running VS as...

Agreed, most of my stuff is done remote or thru an API so it doesn't matter, but for testing something like a desktop installation script that has to be pushed via SCCM or something I don't have an issue with it.

I'd also do it if I had to god forbid interactively work on a server directly with admin rights, I use the code CLI to get a remote tunnel so I'm using VSCode and not RDP or SSH

#

Code CLI is super portable and easy to do that with, I even have a bootstrap bit.ly script on my gists

muted furnace
#

Psedit is nice for remote file mods in vscode as admin.