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

VS Code debugging for Excel Desktop (TypeScript) #54

Conversation

akrantz
Copy link
Contributor

@akrantz akrantz commented Oct 2, 2018

Provides VS Code support for debugging.

@akrantz akrantz changed the title VS Code debugging for Excel Desktop VS Code debugging for Excel Desktop (TypeScript) Oct 2, 2018
@kbrandl
Copy link
Contributor

kbrandl commented Oct 4, 2018

@akrantz excellent -- thanks for doing that.

"$schema": "https://developer.microsoft.com/en-us/json-schemas/office-js/custom-functions.schema.json",
"functions": [
{
"id": "ADD",
"name": "ADD",
"description": "Add two numbers",
"helpUrl": "http://dev.office.com",
"helpUrl": "http://www.contoso.com",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did we ultimately decide we wanted to make this change? I recall a mail thread where Keyur was uncertain about changing this

devServer: {
port: 8081,
port: 8080,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be 3000 instead?


const factory = createWebpackConfig({
...options,
entry: { index: ['./src/customfunctions.ts'] }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we still going to work towards being able to import the webpack config file so we can account for the scenario where there are multiple source files? I guess people can manually update the entry param here to include multiple source files, but that of course is not optimal. Maybe we should just open a work item for that and move forward with this change

If the functions.html is loaded from webpack-dev-server using url https://localhost:3000/functions.html,
it encounters errors. This appears to be because webpack-dev-server assumes a browser environment but
custom functions are run directly using the JavaScript runtime.

To work around this, use the dist folder for the custom function urls (page, metadata, and script):
page:     https://localhost:3000/dist/functions.html
metadata: https://localhost:3000/dist/functions.json
script:   https://localhost:3000/dist/functions.js

The taskpane which runs in the browser WebView control is still loaded using webpack-dev-server
(https://localhost:3000/taskpane.html).
This shouldn't make a different but office-toolbox validate expects the
CustomFunctions ExtensionPoint to have tags in a particular order.
@akrantz
Copy link
Contributor Author

akrantz commented Dec 3, 2018

Replaced by this pull request: #65. Proxy debugging support is in this branch: https://github.com/akrantz/Excel-Custom-Functions/tree/proxy-debugging

@akrantz akrantz closed this Dec 3, 2018
TCourtneyOwen added a commit to TCourtneyOwen/Excel-Custom-Functions that referenced this pull request Aug 19, 2019
- This will ensure we pick up important office-addin-scripts changes as well
TCourtneyOwen added a commit that referenced this pull request Aug 19, 2019
* update dependencies

* update mocha and file-loader

* add CODEOWNERS file

* convert-to-single-host: delete .github folder

* Update packages to latest versions (#47)

- Also make small change to launch.json to fix issue that was causing 'Debug Tests' config to fail after updating mocha version.

* Update office-addin-scripts packages (#48)

-Verified tests pass locally

* Remove office-toolbox package (#51)

The office-addin-debugging package is being updated to have sideload integrated
rather than require using office-toolbox.

This removes the sideload and unload package.json scripts which are no longer needed.
They could be replaced using a command like:

"npx office-addin-dev-settings sideload manifest.xml -a excel"

however this would require a dev dependency on office-addin-dev-settings. I think it would
be simpler to just use the "start" and "stop" scripts instead. These scripts were required
previously so that "office-addin-debugging start" would know how to sideload, but now that
this functionality is part of the office-addin-dev-settings package, it can import and call
it directly.

* Update all package versions (#54)

- This will ensure we pick up important office-addin-scripts changes as well
TCourtneyOwen added a commit to TCourtneyOwen/Excel-Custom-Functions that referenced this pull request Nov 25, 2020
* CustomFunctions.associate() calls added automatically (OfficeDev#152)

* update packages

* update import for [email protected]

* update custom-functions-metadata-plugin (OfficeDev#155)

* enhance webpack config for https and port (OfficeDev#36)

* if '--https false' is specified when calling webpack or webpack-dev-server,
  it will use http instead of https.

  This will run the dev server using http:
  npm run dev-server -- --https false

  This will build without prompting for dev certs:
  npm run build -- --https false

* Get the port from the package.json config "dev-server-port".

  If the value of this config is changed in package.json, "npm run dev-server" will use it.

* Add the ability to run tests (OfficeDev#34)

`npm run test` will now run tests using Mocha and Office.js to run the add-in and validate results.

* 'npm run build:dev' instead of 'build-dev'

* don't need special scripts for testing

* update VSCode task to use 'build:dev'

* Minor fix to address issue when converting to single host

- Without this change, tests will fail for Excel after calling convertToSingleHost with "excel convert-test" params.

* add UI tests (OfficeDev#162)

* Merge Office-Addin-Taskpane/master

* Update CleanWebpackPlugin in webpack.config.js

* Roll back version of clean-webpack-plugin to address build error

* Update issue templates

* Update issue templates

* delete un-used template

* Bug 3426728: Use correct copyright header in templates (OfficeDev#41)

- Fix copyright headers in project html files
- Note, I checked the headers in the other project files (.ts and .css) and they are currently fine

* Add convertToSingleHost.js to allow for removing test infra

* Remove convertToSingleHost script at and of conversion process

* bug fixes in convertToSingleHost.js

* Delete .github folder during convert-to-single-host

* Remove "Preview" from Readme

* Merge-office-addin-taskpane/master

* Revert version of clean-webpack-plugin to address build failure

* Updated sample YAML description

* Updated sample YAML description

* Merge Office-Addin-Taskpane/master

* Merge Office addin taskpane (OfficeDev#179)

* update dependencies

* update mocha and file-loader

* add CODEOWNERS file

* convert-to-single-host: delete .github folder

* Update packages to latest versions (OfficeDev#47)

- Also make small change to launch.json to fix issue that was causing 'Debug Tests' config to fail after updating mocha version.

* Update office-addin-scripts packages (OfficeDev#48)

-Verified tests pass locally

* Remove office-toolbox package (OfficeDev#51)

The office-addin-debugging package is being updated to have sideload integrated
rather than require using office-toolbox.

This removes the sideload and unload package.json scripts which are no longer needed.
They could be replaced using a command like:

"npx office-addin-dev-settings sideload manifest.xml -a excel"

however this would require a dev dependency on office-addin-dev-settings. I think it would
be simpler to just use the "start" and "stop" scripts instead. These scripts were required
previously so that "office-addin-debugging start" would know how to sideload, but now that
this functionality is part of the office-addin-dev-settings package, it can import and call
it directly.

* Update all package versions (OfficeDev#54)

- This will ensure we pick up important office-addin-scripts changes as well

* Remove ugly table in readme
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

Successfully merging this pull request may close these issues.

5 participants