How to deploy and debug wdk 8 kernel mode driver - debugging

I’m trying to set up automatic driver deployment and debugging to test a win 8.1 driver from Visual Studio 2013.
Host machine:
Win 7
VS2013
Target Machine:
Win 8.1
My host machine is set up with 2 network cards, 1 which connects to the corporate network and one spare. The target machine also has a network adapter.
My question is: is it possible to set up automatic deployment and debugging of drivers in Visual studio 2013 by connecting the host and target via a LAN whilst still being connected to the corporate domain and if not, is there a way of debugging wdk drivers on a target pc outside of visual studio, maybe via another application?
The documentation I found here only makes it seem possible by connecting to the same domain name or workgroup.
link to documentation
Many Thanks

Yes you can set up automatic deployment of the driver as well as getting visual studio to do the provisioning of the target pc over a local network as well as being connected to a corporate domain.
Admin rights are needed on the target
An extra ethernet card is needed in the host
All networks connections on the target are open with printer and file sharing options enabled
The ip and name of the target are listed in system32/etc/host in the host PC
A switch is needed and DHCP setting are enable with automatic IP
A good place to start:
https://msdn.microsoft.com/en-us/library/windows/hardware/gg507680.aspx
EDIT:
Basically, this was a nightmare and started dropping its connection. I reverted back to using WinDBG using:
custom scripts to copy everything over to USB
devcon to automactially load the driver
WinDBG to autoload appropriate settings on startup and load source files in to debug

Related

Debugging Windows kernel on a Microsoft Azure platform virtual machine

I want to connect WinDbg to the Windows Server kernel running on a Microsoft Azure platform VM to debug some drivers. I tried to follow the instructions on msdn to connect the debugger over the network, but it seems that requires that the target machine and the host are locate in one local network. What are the options, is it possible to do it at all?
I tried:
Setting Up Network Debugging of a Virtual Machine - KDNET
The problem is solved. It was necessary to add a new rule for the port used by the kernel debugger. This is done in the virtual machine settings in the "Network" section.

How to deploy a UWP to a Galaxy TabPro S with windows 10 OS?

I'm trying to deploy a UWP app from my Alienware 18, Laptop with Windows 10, version 1803 to a Tablet Galaxy TabPro S with Windows 10 version 1803 as well.
I had activated developer mode on the device target and the USB device discovery option as well.
First I tried connecting a USB Cable from my laptop to the tablet which has a USB-C port.
But My laptop doesn't even find it.
What I want is to find a way to deploy a UWP from my laptop to the tablet, I made some research and I found out that, only HoloLens and Windows Phone 10, are findable using USB Connection.
So what step should I follow to successfully remote debug my app to a windows 10 Tablet.
I would appreciate details because I tried to follow remote deploying but I haven't been able to successfully find the tablet.
The Windows 10 on your tablet, just like on your development machine, supports remotely debugging over the network rather than over USB. Make sure both machines are in developer mode, with the other machine also having Device Discovery turned on as described here. Both should connect to your WiFi as a private network. After that it should be as simple as configuring your project to deploy to the other machine, rather than locally, as described here and here. Don't forget to pair them with a PIN.
If you host a web API on your development machine, configure your firewall as described here.
Use remote debugging over at https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugging?view=vs-2017
Make sure you follow the instructions, sometimes remote debugging is barred by firewall so check that.
Alternative right click your main project, go to store then click create packages for sideloading and then send the package over at your Samsung device.
So what step should I follow to successfully remote debug my app to a windows 10 Tablet.
To run a UWP app on a remote machine, you must attach to it using the Remote Tools for Visual Studio.
In some scenarios, the remote tools are automatically installed when you deploy to a remote device. For example,
For Windows 10 PCs running Creators Update and later versions, remote tools will be installed automatically.
Then, your remote device and the Visual Studio computer must be connected over a network or connected directly through a USB or Ethernet cable. Debugging over the internet is not supported.
After that, you need to configure the Visual Studio project for remote debugging. In the properties of the project, select the Debug and choose the Remote Machine from the Target Device list. In general, I will input the remote machine's IP address, you could choose Find to choose the device from the Select Remote Debugger Connection dialog box.
Next step, please move to your Tablet, you need to Set up the remote debugger. You must have administrative permissions on the remote computer. Then, open the Start menu and search for Remote Debugger. If you could find it, just start it normally. If you cannot find it, you need to install it Remote Tools manually. See this link to Download and Install the remote tools. Once the Remote Debugger started, you could do some configurations. After that, you could choose Start Debugging on the Debug menu (Keyboard: F5). The project is recompiled, then deployed to and started on the remote device. Please read Run UWP apps on a remote machine in Visual Studio for more information.

Windows Mobile device not connecting to VS2008 using CoreCon/RDB2008

I am trying to connect a Windows Mobile 5.0 device with Visual Studio 2008 using Corecon (tried all processor architecture files available inside wce400 folder) and RDB2008, but it won't connect. Here is the device details page:
Does anyone have any idea what could be wrong here? I suspect a mix-up of Device OS, architecture and SDK. Appreciate any effort or help on this. Thanks.
Remote debug within VS2008 for a Windows Mobile device needs a valid IP connection with the debug ports (5655) opened (if a firewall is active).
First try to start a debug session with a simple .NET Compact Framework application (a C# SmartDevice project) and the device is connected via USB ActiveSync/WindowsMobileDeviceCenter. If that does not work, you are in trouble. Does the device connect to Windows Mobile Device Center? Try Start>Settings>Connections>USBtoPC setting change on the device.
If you can 'debug' using an USB connection but not using WiFi, check subnet and ports and Internet connection setting for Wireless Card on the device. Can you ping the device from the VS2008 PC? Can you ping the VS2008 PC from the device (vxUtils ping)? Is the debug port opened on the device after RDB2008.exe started and installed (see my NetStat for Windows Mobile)?
You may try a network trace on the VS2008 PC to see what happens on port 5655. Or even a network trace on the device (MS powertoys NetAnalyze).
I assume you followed this

Visual Studio 2010 Remote Debug across domains

I'm trying to set up remote debugging across domains. My Windows 7 workstation running Visual Studio 2010 is on one domain and I'm trying to debug an ASP.NET app running in IIS 7 on a Widows 2003 server box in another domain. I have found many instructions on how to set this up, this being the best, most clearly written one: http://blogs.interknowlogy.com/2011/11/16/remote-debugging-from-visual-studio-2010/
However, I can only seem to connect to the remote debugging monitor on the server if Visual Studio is being run as the local user on my workstation, not as the domain user. This creates a number of challenges, such as loss of source control connectivity. When I try to connect using the domain user I get the following error: "Unable to connect to the Microsoft Visaul Studio Remote Debugging Monitor named 'username#servername'. The specified account does not exist." (I have substituted a generic username#servername for the actual values)
I have found a number of sources suggesting this will work with the domain user running VS2010 but have had no luck. Any idea what I might be missing?
Solved
First, i've read #KyleMit's answer on the same question and done all steps.
But, for across domain debugging also need to edit C:\Windows\System32\drivers\etc\hosts file on local computer.
Just add remote computer's ip address like this:
172.172.172.172 SRV-TEST-ADRESS
Where:
172.172.172.172 - ip address of your remote server
SRV-TEST-ADRESS - Server's name from Visual Studio Remote Debugger
Monitor on remote computer
You can know your server's ip address by ipconfig in cmd
After that, i could attach to proccess on remote computer across domain.

Visual Studio 2012 Windows kernel debugging - can't provision VM target

Host: Visual Studio 2012, Windows 8 Host, WDK8
Target: VirtualBox - Windows 7
When I try to add the target computer (Driver -> Test -> Configure Computers) in Visual Studio (like at http://msdn.microsoft.com/en-us/library/windows/hardware/hh439359%28v=vs.85%29.aspx ):
I select "Provision Computer and choose debugger settings"
I choose to use a Serial connection
But the result is always "Could not find a host entry for Name of VM"
VS gives the same response if I try to connect through the network (I know kernel debugging from a Win8 host to a Win7 target isn't supported through the network).
I can't see a problem in the connection; connection without provision works after hitting Debug -> Break (otherwise, I hit a Waiting to reconnect... message).
Anyone get this working or has better idea on how to debug the Windows OS in VirtualBox?
You should not choose the debugger option to provision the target, as the debugger docs state that "Provisioning is not supported for virtual machines." (See this page: Provision a computer for driver deployment and testing.) This is most likely because provisioning requires network connectivity to the target, no matter how you choose to connect for the actual kernel debugging session.
As you've already observed, connection without provisioning works just fine, so you can just do that instead. Make sure you've properly attached the virtual serial port on the target to a host named pipe.
In any case, provisioning isn't strictly necessary to run the kernel debugger. It's just a convenience that automatically enables kernel debugging on the target, makes some other useful configuration changes, and installs a set of useful tools. You can see what provisioning does on this page: What happens when you provision a computer?
Here is some general guidance on setting up kernel debugging of a VM: Setting Up Kernel-Mode Debugging of a a Virtual Machine in Visual Studio
This link Kernel-Mode Debugging in a VM using Visual Studio 2012describes how to provision to virtual machine. You will need to configure network in a way that host and guest can ping each other.
After that you need to update "hosts" on both computers(add ip and NetBIOS of guest to host "hosts" file and ip and NetBIOS of host to guest "hosts" file).

Resources