OfficeDev / vscode-debugger-extension-for-office-addins

VS Code extension to allow for debugging Office Add-ins in VS Code
18 stars 7 forks source link

Got a response from the target app, but no target pages found #14

Closed thunter05 closed 4 years ago

thunter05 commented 4 years ago

Super excited about this Debugger Extension for Office-JS. Below is a screenshot of the error I got when trying to start up the debugger. Any thoughts on how to fix this?

office-addin-debugger-failed
TCourtneyOwen commented 4 years ago

This could be due to few things. First are you running VS Code as admin? This is required. Secondly is your taskpane add running in Edge? You can check this by seeing if there is a process called WWAHost.exe running. If you don’t see that process, then your addin may be running in IE or Edge Chromium, which aren’t supported. Is your taskpane addin opened before trying to attach to the debugger? This is also a requirement before you can attach the debugger.

thunter05 commented 4 years ago

Thanks for the quick response! It does look like my taskpane is running Internet Explorer..... So there is no way I can change that? Please tell me there is a way. So depressing.

thunter05 commented 4 years ago

It looks like the browser is based on my versions of windows/office365. So no way to fix? I’m so sad about this.

https://docs.microsoft.com/en-us/office/dev/add-ins/concepts/browsers-used-by-office-web-add-ins

TCourtneyOwen commented 4 years ago

What version of Windows and Office 365 are you on? We may be able to work around this assuming you are on Windows 10, which has Edge installed. We have an npm package that allows for switching between IE and Edge for the taskpane add-in runtime, but you will need to be running Windows 10 v. 1903 or later. As for O365, if you fairly up to date with the latest version you should be fine.

thunter05 commented 4 years ago

I’m on windows 10 enterprise 1809

TCourtneyOwen commented 4 years ago

Can you update to 1903, or does company policy prevent you? You will need to be on 1903 or later.

TCourtneyOwen commented 4 years ago

If you can't update to 1903, you can always fall back to Visual Studio for debugging, but you may already be aware of that and don't want to go that route. Certainly debugging in VS Code is preferable because you can debug and write you code in a single IDE.

thunter05 commented 4 years ago

I’m going to try and upgrade. I will let you know today. Thanks so much!

thunter05 commented 4 years ago

So bad news is I cannot upgrade my windows version to 1903.... Looks like using this new extension is a no go. So depressing.... I'm trying to figure out how to use custom functions with the shared runtime to pull data from an external api but I have no visability into why it's not working. I guess I'm out of luck.

TCourtneyOwen commented 4 years ago

You can always use Visual Studio or load your project in Excel Online and use Chrome DevTools, which are quite good for debugging on the web. Let me know if you want any guidance on that.

thunter05 commented 4 years ago

The guidance would be great! Which would you say is best if I’m developing for excel windows desktop primarily? And can I use Visual Studio Community Edition?

If I use Visual Studio I can debug the excel interactions and custom functions? I’ve been able to use chrome to debug some UI items and CSS.

TCourtneyOwen commented 4 years ago

If you are just looking to debug custom functions I think you may still be able to use VS Code by following these steps: https://github.com/OfficeDev/office-js-docs-pr/blob/master/docs/excel/custom-functions-debugging.md. If you want debug the taskpane code however you will need to use Visual Studio or Chrome DevTools, in lieu of using the VS Code extension. I’ve successfully debugged custom functions in the past using VS Code without the new extension. and I’m trying to recall the approach I took. I can try it out myself and report back but in the meantime perhaps you can try the steps in the link.

TCourtneyOwen commented 4 years ago

I confirmed that using that using the "Excel Desktop" debug config in the https://github.com/OfficeDev/Excel-Custom-Functions repo (this is the repo Yo Office uses to create custom functions projects) works to debug custom functions in VS Code. All you need to do is select the "Excel Desktop" config in the VS Code Debug dropdown and hit run. Once Excel starts, you can just set breakpoints in src/functions/functions.ts, enter a custom function in Excel and your breakpoint will be hit in VS Code.

image

AltitudeApps commented 3 years ago

This issue was the first thing I found when searching for help on the error message "Got a response from the target app, but no target pages found".

In case anyone else ends up here because of that same search, I'll link to something I posted on issue #16 , which describes what I do to fix things, which oftentimes works for me.

https://github.com/OfficeDev/vscode-debugger-extension-for-office-addins/issues/16#issuecomment-678833738