Attach to a win8 process in VS2012

348 views Asked by At

I'm developing a windows-8 application. I used to click the DEBUG button in the toolbar of VS2012 and start debugging the application. But this behavior causes the application being re-installed(the corresponding folder in \AppData\Local\Packages is removed and then created), which is not what I want, since the fake data in the local folder is removed. I tried using Attach to a process function in VS, but can't find the right process(like w3wp.exe when debugging web applications). Is this debugging approach possible? Or a better way to debug without removing my fake data in the local folder?

1

There are 1 answers

3
Matthew Kennedy On BEST ANSWER

If your metro app is started, you should be able to attach to it. I just tried it on the Release Preview, and it works as expected. However, your data shouldn't be placed in the \Packages folder, but instead in its own folder in \AppData\Roaming or Local. Another approach if you want to test using truly fake data is that you can include the data files in your project either as a resource in Resources.resx or as files in the project that get copied to the output directory.