Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ship WinDbg Preview outside of the Windows Store #19

Closed
aluhrs13 opened this issue Jun 19, 2019 · 66 comments
Closed

Ship WinDbg Preview outside of the Windows Store #19

aluhrs13 opened this issue Jun 19, 2019 · 66 comments
Assignees

Comments

@aluhrs13
Copy link
Contributor

Many people are unable to use WinDbg Preview due to their enterprises disabling access to the Microsoft Store or needing it in production environments where they can’t use Store applications. The top reason for us shipping via the store initially was to enable us to easily ensure everyone had the latest version. We’re shipping updates fairly often and we already have issues with people using 7+ year-old versions of WinDbg and reporting issues on them that have long since been fixed, so we want to ensure that it’s effortless to be using the latest bits.

We’ve stabilized quite a bit and we’re comfortable making it easier to get to the “xcopy install” as an option for people who want or need that, and we want to offer a method of auto-updating without access to the Store. Our current plan that we’re looking at releasing an MSIX possibly with an AppInstaller. That’ll give the options of you downloading and extracting the MSIX for a portable install that can be copied anywhere, or installing the MSIX to receive updates automatically.

We want to make sure this will work for the situations that are blocked today and still looking at other options, so feel free to leave any comments if you think this is a good direction, or if we’re missing your scenario.

@aluhrs13 aluhrs13 self-assigned this Jun 19, 2019
@aluhrs13 aluhrs13 pinned this issue Jun 19, 2019
@crispinwright
Copy link

Sold, where do I sign? Nice one Andy.

@rbeex
Copy link

rbeex commented Jul 3, 2019

Im working in an enterprise development environment. Windows Store is disabled by our admins and therefore i can´t preview "WinDbg Preview". I also request this feature.

@randomascii
Copy link

I would definitely be more inclined to use WinDbg Preview, and give feedback on it, if it was made available outside of the store. Right now I would have to install it on a personal machine, extract the install directory, and then copy that to my corporate workstation. This feels like more shenanigans than I truly want.

@dss539
Copy link

dss539 commented Jul 24, 2019

Yes please provide this.
The type of person who would even use WinDbg is very familiar with manual updates. We don't need the store to handle that for us.

It would be ideal if you release it as a chocolatey package.

@amithegde
Copy link

amithegde commented Sep 2, 2019

Providing an installer or hosting the tool on MS Store is not useful for power users. What we need is a single .exe which we can copy around just like the SysInternals tools. Installing from the Microsoft Store experience is good for applications like solitaire.

I can give example of good update model adopted by 3 tools:

  • ConEmu: I use a portable version which asks me to update if there is an update available whenever I open the tool
  • VSCode: doesn't seem to have a portable version, comes with a pretty decent update functionality
  • ILSpy: portable application with releases on github
    image

@jessemckenna
Copy link

It would be awesome to see this happen! I'm a new developer trying to learn WinDBG, and I would love to learn on the new version, but I can't while it's locked behind the Microsoft Store. I've heard Preview is an easier user experience, so I really want to check it out. Thanks for pushing for this!

@rtischer8277
Copy link

I waste three dev hours trying to get WinDbg Preview to work by downloading it from the Store and when that didn't work (the PIN challenge failed repeatedly), I attempted to download using the VS installer. Still didn't work. WinDbg Preview works fine on another machine where I downloaded it a month ago or so.

@mchabot2048
Copy link

I'd appreciate an outside-of-store method for getting Windbg Preview. I've been trying to get it installed in the lab to analyze a problem but the Store method is failing and I can't figure out why. I've tried getting support via my VS/MSDN subscription but it seems that there isn't support for it or Support doesn't know who is supposed to support Store install problems

@rtischer8277
Copy link

I'd appreciate an outside-of-store method for getting Windbg Preview. I've been trying...
I no longer see a way to download it outside the store. The noose tightens. I also checked Feedback Hub and found "unable to download WINDBG" preview. This was posted Dec 15, 2019, so pretty new. MS's answer: "We've got it". No explanations for what is going on.

@amithegde
Copy link

One workaround I did is to download from store on a windows 10 device and then find the location of the process and copy it over to other devices.

Thumbs down for making it so cumbersome.

@wjbaker1
Copy link

wjbaker1 commented May 6, 2020

I would also like a way to download the WinDbg Preview to a thumb drive to transfer to another machine. I can't download from Windows store on my company PC (likely disabled by policy). I did download on my personal PC but couldn't transfer the .EXE to a thumb drive. I ended up just copying 1 dump file to the personal computer and analyzing it there.

@randomascii
Copy link

Note that it is actually possible to do this yourself. See this twitter thread:

https://twitter.com/M_Cedervall/status/1229186171999334400

I'm not quite sure how it works but using the linked scripts you can download the Windbg Preview package and then install it, all on a machine without store access. It should stay updated.

@canhazcodez
Copy link

and here I thought I'd finally get a solution to the problem of not having access to the store.
As "enterprise networks" are, sometimes, not only is the store blocked, but twitter too, so I can't read the solution that @randomascii linked. grrrrr

@randomascii
Copy link

The twitter thread mostly says that you can use this script to download apps without using the store:

https://github.com/MattiasC85/Scripts/blob/master/OSD/Download-AppxFromStore.ps1

You'll need the store identifier which can usually be found with a quick Google search. Here's the one for Windbg Preview:

https://www.microsoft.com/en-us/p/windbg-preview/9pgjgd53tn86?atc=true

I haven't tried these steps for a long time so I don't remember any details, and it apparently fails for some people, so, good luck.

@darkguy2008
Copy link

While the workaround is appreciated, it is NOT the solution to the issue. Come on MS, providing a power tool in the Microsoft Store where you know that some companies have it disabled (and it's even disabled by default in your own LTSC installs) ? This is plain ridiculous.

@WowItsDoge
Copy link

It would bei really cool, if WinDbg Preview was available outside of the Windows store. Some companies have disabled the store, but this tool would bei usefull for a lot of debbuging sessions.

@Strandedpirate
Copy link

3-19-2021 - you literally can't install this hot garbage from the MS store. Throws an HTTP 500 error. Clearly there must be something wrong with it for them to intentionally ignore our inability to install the stupid thing.

image

@rmliu
Copy link

rmliu commented May 14, 2021

store identifier for Windbg Preview:
https://www.microsoft.com/en-us/p/windbg-preview/9pgjgd53tn86

@RedWingBB
Copy link

Once again, I had a situation where windbg preview could have been a great help
The problem showed on an Azure instance but not my development machine
I tried to use the windows store to install it
When I attempted to get it from the windows store to the azure instance, the install wouldnt procede
because it wanted to direct the app to my base machine, where I had installed windbg preview before

Please - make a portable version that could be unzipped, for situations in the field
We cant install visual studio on customer machines

@sdmf74
Copy link

sdmf74 commented Jul 7, 2021

Still cannot download windbg preview on latest version of windows 10 pro. Any other way to open memory.dmp files?

@gwillcox-r7
Copy link

Still cannot download windbg preview on latest version of windows 10 pro. Any other way to open memory.dmp files?

You can install the normal version of WinDBG using the Debugging Tools for Windows which should still be able to open .dmp files.

@darkguy2008
Copy link

Still cannot download windbg preview on latest version of windows 10 pro. Any other way to open memory.dmp files?

You can install the normal version of WinDBG using the Debugging Tools for Windows which should still be able to open .dmp files.

Thanks, but this is not what we're asking for.

@gwillcox-r7
Copy link

gwillcox-r7 commented Jul 14, 2021

@darkguy2008 Agreed, however I was just trying to answer @sdmf74's question. You can see I clearly quoted his original post to post my response. Please don't assume I was trying to answer the question in this thread as a whole: I fully agree with your point that WinDBG Preview needs to work on other OS's, I was merely trying to help someone with a workaround for their specific situation until a more proper solution can be implemented.

@darkguy2008
Copy link

@darkguy2008 Agreed, however I was just trying to answer @sdmf74's question. You can see I clearly quoted his original post to post my response. Please don't assume I was trying to answer the question in this thread as a whole: I fully agree with your point that WinDBG Preview needs to work on other OS's, I was merely trying to help someone with a workaround for their specific situation until a more proper solution can be implemented.

Oh! Alright, I may have been too harsh it seems, sorry for the confusion :) makes sense, and I also agree with you!

@MV10
Copy link

MV10 commented Sep 21, 2021

2+ years later...

@MikeDiack
Copy link

This is bananas. It's now 2.5 years since the original post and:

a) The preview build is still in preview??! (a 2.5+ year beta cycle?!?!). Is it ever gonna be productionised/shipped?
b) The ability to get the code, without relying on the Store (the original point of this issue), has not been addressed...

What on earth?

@MikeDiack
Copy link

MikeDiack commented Nov 17, 2021

Is WinDbg Preview still actively even being worked on? It surely cannot take 2.5 years to released it! I notice the original release was Aug 2017 - 4.25 years ago!

@scdub
Copy link

scdub commented Sep 28, 2022

@lzybkr that's great! In case you have any recalcitrant elements resisting this change, I've made a Venn diagram of WinDbg users to clarify the situation:

windbg

More seriously, I appreciate your efforts and look forward to being able to install WinDbg Preview again on my employer's machines which disallow Store usage.

@johan-boule
Copy link

johan-boule commented Oct 8, 2022

Where does this "xcopy install" terminology come from ? I often read that from MS's in-house people, but what it reminds me of is when IBM-PC enthusiasts used to have to deal with the poor MSDOS. That's circa 80's and early 90's and was confined to nonprofessional circles. Should I also bring my cassette walkman when I "install" your debugger ?

EDIT: people can't read sacarsms... I'm all for a portable install, what I don't like is the tentative spreading of a very tainted terminology. I don't like XCOPY.COM, that stuff smelt bad and brings bad memories of bad PC machines and OS.

@MV10
Copy link

MV10 commented Oct 8, 2022

Or perhaps you're just not very good at it.

@johan-boule
Copy link

Kinda off topic: I cannot install either the classic WinDbg via the Windows Kit package. When I use the "Apps & Features" UI thingy, the package proposes to click on checkboxes to install it. Fine. But then, on a corporate machine, the installer fails to download it from internet.

@Seikilos
Copy link

Seikilos commented Oct 8, 2022

Kinda off topic: I cannot install either the classic WinDbg via the Windows Kit package. When I use the "Apps & Features" UI thingy, the package proposes to click on checkboxes to install it. Fine. But then, on a corporate machine, the installer fails to download it from internet.

I think in this case you need to xcopy install the package.

@adeelahmadk
Copy link

Did anyone try the Windows SDK iso?

@lzybkr
Copy link
Collaborator

lzybkr commented Oct 25, 2022

IIRC, you can extract the installer from the iso, but it's been a few years since I tried that.

@aequabit
Copy link

How to use WinDbg Preview without the Microsoft Store:

Disclaimer: I assume your Windows installation has been activated with a proper license, this is not meant to circumvent the Microsoft Store DRM

  1. Copy the Store URL of WinDbg Preview (https://apps.microsoft.com/store/detail/windbg-preview/9PGJGD53TN86)
  2. Use store.rg-adguard.net to get the direct link of the APPX package
  3. Install it by just opening it or via the PowerShell using Add-AppxPackage -Path <APPX package>

If it doesn't work, just extract the package (changing the extension to .zip will give you the context-menu option to do so) and run DbgX.Shell.exe.

@lzybkr
Copy link
Collaborator

lzybkr commented Apr 18, 2023

Instructions for installing outside the store: https://aka.ms/windbg
Or a more direct link: https://aka.ms/windbg/download

@lzybkr lzybkr closed this as completed Apr 18, 2023
@Ivan171
Copy link

Ivan171 commented Apr 18, 2023

The installer downloaded a 617 MB msixbundle file. 617 MB doesn't seem right. Is the new WinDbg an Electron app?

@MV10
Copy link

MV10 commented Apr 18, 2023

Or a more direct link: https://aka.ms/windbg/download

There's nothing "direct" about having to download and run an installer that needs an Internet connection. This is still just as much a blocker for corporate users as the Store link was. Although I haven't used the installer yet, the opening screen also mentions needing admin rights, which is also going to be a corporate blocker. I'd imagine corporate users are a major segment of WinDbg's user population, if not the largest. Going in the wrong direction here...

And the thread is closed?!

@sylveon
Copy link

sylveon commented Apr 18, 2023

The installer doesn't need admin rights. It lists the permission of the app, one of them being the ability to run as admin, to debug processes running as admin. The installation itself does not need it, however.

@sylveon
Copy link

sylveon commented Apr 18, 2023

The msixbundle contains a full copy of windbg for both arm64 and x64, so it's twice as big as the version you end up with (your system only installs the version needed for your architecture). Windbg also carries its own copy of the windows debug engine, to be standalone from the Windows SDK, and that's a sizable component

@lzybkr
Copy link
Collaborator

lzybkr commented Apr 19, 2023

The msixbundle also includes a full build for x86 - making it 3x as big as what you actually need installed.

Note that msxixbundle and msix are both zip files - so you can download and run the debugger without installing anything.

Here is a PowerShell script that downloads and runs the debugger - no install required. Feel free to adapt as you see fit:

param(
    $OutDir = ".",
    [ValidateSet("x64", "x86", "arm64")]
    $Arch = "x64"
)

if (!(Test-Path $OutDir)) {
    $null = mkdir $OutDir
}

# Download the appinstaller to find the current uri for the msixbundle
Invoke-WebRequest https://aka.ms/windbg/download -OutFile $OutDir\windbg.appinstaller

# Download the msixbundle
$msixBundleUri = ([xml](Get-Content $OutDir\windbg.appinstaller)).AppInstaller.MainBundle.Uri

if ($PSVersionTable.PSVersion.Major -lt 6) {
    # This is a workaround to get better performance on older versions of PowerShell
    $ProgressPreference = 'SilentlyContinue'
}

# Download the msixbundle (but name as zip for older versions of Expand-Archive
Invoke-WebRequest $msixBundleUri -OutFile $OutDir\windbg.zip

# Extract the 3 msix files (plus other files)
Expand-Archive -DestinationPath $OutDir\UnzippedBundle $OutDir\windbg.zip

# Expand the build you want - also renaming the msix to zip for Windows PowerShell
$fileName = switch ($Arch) {
    "x64" { "windbg_win7-x64" }
    "x86" { "windbg_win7-x86" }
    "arm64" { "windbg_win-arm64" }
}

# Rename msix (for older versions of Expand-Archive) and extract the debugger
Rename-Item "$OutDir\UnzippedBundle\$fileName.msix" "$fileName.zip"
Expand-Archive -DestinationPath "$OutDir\windbg" "$OutDir\UnzippedBundle\$fileName.zip"

# Now you can run:
& $OutDir\windbg\DbgX.Shell.exe

@62f
Copy link

62f commented May 3, 2023

chocolatey

Just downloaded chocolatey software inc's GUI for windows and it threw an exception right off the bat.file; furthermore, a file named ChoclateyGuiCli.config it states ```supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"```, and from the repositories available in powershell's winget search, no .NET 4 versions exist whatsoever. Furthermore I am able to install any other .NET version along with Chocolatey, which as you know means Choc's basic requirements aren't even being loaded.

@theimpostor
Copy link

@lzybkr Thanks for the powershell script! I would like to be able to use windbg and/or cdb from the command line in a windows docker container. Can DbgX.Shell.exe be used in that manner?

@lzybkr
Copy link
Collaborator

lzybkr commented May 8, 2023

@theimpostor DbgX.Shell.exe is the new windbg (the version that is called WinDbg Preview in the Microsoft Store. The msix installer creates an execution alias windbgx.exe that links to DbgX.Shell.exe.

It can be launched from the command line, but is a GUI app. You could run in a Windows Sandbox, or alternatively, run dbgsrv.exe in your container and connect to the debugger remote outside the container.

@62f
Copy link

62f commented May 31, 2023

@lzybkr

You could run in a Windows Sandbox, or alternatively, run dbgsrv.exe in your container and connect to the debugger remote outside the container.

My Windows Sandbox won't start.

@lzybkr
Copy link
Collaborator

lzybkr commented Jun 1, 2023

@62f

My Windows Sandbox won't start.

I haven't used Windows Sandbox a ton and haven't seen any issues with it not starting. It's probably worth trying to create a debug server with dbgsrv.exe in your container.

@62f
Copy link

62f commented Jun 3, 2023

@lzybkr

create a debug server with dbgsrv.exe in your container.

I'm not using Docker, and as far as I can tell, Windows Sandbox 'containers' are not only inaccessible without a functioning sandbox, they cease to exist outside of an active sandbox session.

@Seikilos
Copy link

Seikilos commented Jun 3, 2023

@lzybkr

create a debug server with dbgsrv.exe in your container.

I'm not using Docker, and as far as I can tell, Windows Sandbox 'containers' are not only inaccessible without a functioning sandbox, they cease to exist outside of an active sandbox session.

I had the same issue, maybe you did not enable hypervisor type 1. See this: https://learn.microsoft.com/de-de/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v

Note: If you are using Virtual Box, you have to disable type 1 hypervisor again, otherwise you get funny startup issues.

@Ben136KBC
Copy link

Ben136KBC commented Sep 5, 2023

lzybkr thank you for that PowerShell script. It still works (Sept 2023). For me the installer from https://aka.ms/windbg/downloads runs but fails to install with a generic "Access Denied" error. Sigh....... But thanks to your powershell script I was able to get my hands on the latest version and have it running. Yay! Thank you.

@kevoreilly
Copy link

More thanks for that PowerShell script @Izybkr - I've been struggling for a long time to find an easy way to get the latest WinDbg & TTD running inside (relatively old) Win10 VMs within CAPE sandbox, this script was the answer!

@gonchik
Copy link

gonchik commented Mar 1, 2024

Thank you for the script,

and I am still trying to understand that complication from MS side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests