microsoftfeedback/WinDbg-Feedback

Ship WinDbg Preview outside of the Windows Store

Closed this issue · 69 comments

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.

Sold, where do I sign? Nice one Andy.

rbeex commented

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.

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.

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.

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

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!

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.

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

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.

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.

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.

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.

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

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.

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.

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.

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 commented

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

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

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.

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.

@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 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 commented

2+ years later...

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?

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!

MV10 commented

Worse, I work for one of Microsoft's largest customers, and several colleagues and I use WinDbg at least weekly, if not daily. We were interviewed back when the rewrite was planned, we specifically spoke out against the plan to use the Store for distribution, and apparently nobody cared. It's a big problem. (Frankly, the wonky naming, updating, and installation of all Store-based "modern" apps is a big problem.)

It would be nice if this product was open-sourced, too. It isn't like it's some highly proprietary money-maker.

The ability to get the code, without relying on the Store (the original point of this issue), has not been addressed...

https://twitter.com/timmisiak/status/1456278428466905097

So it seems there is at least a plan.

Is WinDbg Preview still actively even being worked on?

https://twitter.com/timmisiak/status/1454217382998675459
https://twitter.com/timmisiak/status/1456289454453182473

I'd recommend to follow the guy.
He is working on WinDbg and seems to drop bit of info now and then.

It surely cannot take 2.5 years to released it!

Honestly, just forget about the "preview" part in the name and use it.
I find new WinDbg so much better than old one and can only recommend it.

Regarding installation without access to MS Store check this article:
https://randomascii.wordpress.com/2021/11/12/windows-performance-analyzer-from-store-or-sdk/

It is about Windows Performance Analyzer not WinDbg but similar can be used to download WinDbg Preview package.

Its unfortunate more energy isnt being put into windbg preview

The useability of it is better than windbg and i find its somewhat more effective at examining DMP files as well, and quite a bit better at DMP than Visual Studio

If it could be placed on a machine by unzip, that is without an install, it would be a valuable debugging tool in the field

I know the problem is still not yet solved. In the meantime, it' actually quite easy to get yourself a portable copy of WinDbg preview. Here's how:

  • Go to: https://store.rg-adguard.net/
  • Choose productId from the drop down, then input the store product id of WinDbg which is 9pgjgd53tn86
  • Click on the tick button and give it a few seconds
  • The website should display direct download links (check that links are pointing to Microsoft servers just to be sure)
  • Download the appx file (should be the last one on the list)
  • DO NOT try to install it by running the appx file, instead, just unzip it to a folder and voilà! your portable version of WinDbg is ready to be used.

Thanks for these steps - they worked.

One more comment;
The above steps work, but the download is an Install
What is needed in the field is an XCopy type package, for instance a simple Zip with the necessary components
Debugging complex situations in the field cant be doing Installs
A shame this useful tool isn't getting more attention

One more last comment
After following steps as outlined by disklosr, the command to start windbg preview is
DbgX.Shell.exe

Tricky,
found some website that explained to me how to download the latest msixbundle (currently Microsoft.WinDbg_1.2206.19001.0_neutral_~_8wekyb3d8bbwe.Msixbundle)

After powershelling and calling Add-AppxPackage I now see "WinDBG Preview" on my start menu. 'Yay'.
But I cannot run it. I cklick on it, see a small progress bar on the start menu entry and then nothing.
Checking Event Viewer -> /Applications and Services/Microsoft/Windows/Store/Operational

tells me something with a license acquisition failure due to network resolution.

Failure Message: hr: 0x800704cf
Function: ApplicationLicenseManager::GetLicenseForInstalledPackage
Source: onecoreuap\enduser\winstore\licensemanager\lib\applicensemanager.cpp (260)

So the ms store app infrastructure seems to require a license.

Since the machine is in a corporate environment not only the store is blocked but also some addresses, presumably the license manager endpoint.
So for now I seem to be unable to use the Preview Version at all. Too bad, Time Travel Debugging looks great 😐

@Seikilos do not try to install the package, instead just unzip it and you'll have a portable version of WinDbg ready to run. See my previous answer for more info.

@Seikilos do not try to install the package ...

D'oh
after I read the first couple of words in the github mail notifcation of your post I just realized the same. ... :D

Thanks for guiding me into the right direction. Extraction worked great 👍

Trying to keep the picks in a toy safe away from those who regard them as tools of the trade is not a very bright idea at the minimum.

Dear Diary
The year is 2022 and Microsoft still didn't Ship WinDbg Preview outside of the Windows Store.

One more comment; The above steps work, but the download is an Install What is needed in the field is an XCopy type package, for instance a simple Zip with the necessary components Debugging complex situations in the field cant be doing Installs A shame this useful tool isn't getting more attention

No problem, there's no need to run the installer, just open .msix (or .appx, or whatever new installer extension that MS extension naming taskforce comes up with tomorrow) as plain zip archive (simply rename it if your tools don't allow opening arbitrary files as archives like e.g. Total Commander does), extract to a directory of your choice, run DbgX.Shell.exe.

The team is actively working on this, hopefully I'll have a download link I can share soon.

scdub commented

@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.

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 commented

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

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.

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.

Did anyone try the Windows SDK iso?

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

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.

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

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

MV10 commented

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?!

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.

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

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 commented

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.

@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?

@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 commented

@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.

@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 commented

@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.

@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.

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.

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!

Thank you for the script,

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

For those who don't know how to use powershell script or if you see the script flash close or encounter any error(s), you can actually break the script and do it manually.

  1. Download windbg.appinstaller from https://aka.ms/windbg/download
  2. Extract AppInstaller.MainBundle.Uri
    $msixBundleUri = ([xml](Get-Content $OutDir\windbg.appinstaller)).AppInstaller.MainBundle.Uri
    paste this into powershell and use the windbg.appinstaller path you have downloaded in step 1 to replace $OutDir\windbg.appinstaller, then use echo $msixBundleUri to extract the download link:
    should be something like https://windbg.download.prss.microsoft.com/dbazure/prod/1-2410-11001-0/windbg.msixbundle
  3. Download windbg.msixbundle using url extracted from step 2. This one is 600MB+, so you may want to download it from your browser or downloader if you are suffering from poor internet connection and using powershell to download would waste a lot of time. Rename the file to windbg.zip.
  4. Use any zip extractor you prefer to extract windbg.zip, you should get 3 msix files (ignore other files).
    windbg_win-arm64.msix & windbg_win-x64.msix & windbg_win-x86.msix. Rename them to .zip extension separately.
  5. Choose your machine architecture and extract these zips again using your favorite zip extractor. Then you should see DbgX.Shell.exe inside, which is the last step mentioned in the script.
  6. Double click the .exe file to run, you should be able to see windbg preview now.

image

These are the steps I used to install windbg from win server 2022.

Also, for those who encountered 403 Forbidden error when using Invoke-WebRequest, you may want to set your protocol first
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 as stated in https://stackoverflow.com/questions/73572041/run-invoke-webrequest-in-powershell-generate-403-error

MV10 commented

Or ... they could just go back to letting us download zips and skip all this ridiculous noise.

Yes, please just let us download a zip file and install from there. Why? We don't want to and should not have to jujmp through so many hoops to get WinDbg. And many companies disable the store via policy, putting WinDbg on Windows store makes it unavailable.