Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Elaborate on async stack trace warning #340

Merged
merged 7 commits into from
Oct 20, 2017

Conversation

gaofanmichael
Copy link
Contributor

Add a log message address the 'INSPECTOR_ASYNC_STACK_TRACES_NOT_AVAILABLE' warning.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 11, 2017
@gaofanmichael gaofanmichael changed the title elaboration on async stack trace warning Elaborate on async stack trace warning Oct 11, 2017
'INSPECTOR_ASYNC_STACK_TRACES_NOT_AVAILABLE') {
console.log(
'The current debug agent does not use Inspector async stack ' +
'traces. The above warning will not affect the debug agent.');

This comment was marked as spam.

This comment was marked as spam.

it('should elaborate on inspector warning on 32 bit', function(done) {
let logText = '';
const oldLog = console.log;
console.log = function(s: string) {

This comment was marked as spam.

This comment was marked as spam.

@@ -315,6 +316,49 @@ describe('Debuglet', function() {
assert.deepEqual(mergedConfig, compareConfig);
});

it('should elaborate on inspector warning on 32 bit', function(done) {

This comment was marked as spam.

This comment was marked as spam.

const arch = process.arch;
const nodeVersion = /v(\d+\.\d+\.\d+)/.exec(process.version);
if (!nodeVersion || nodeVersion.length < 2) {
(assert as any).fail();

This comment was marked as spam.

This comment was marked as spam.

} else if (semver.satisfies(nodeVersion[1], '>=8') &&
(arch === 'ia32' || arch === 'x86')) {
assert(logText.includes(
'The current debug agent does not use ' +

This comment was marked as spam.

This comment was marked as spam.

'INSPECTOR_ASYNC_STACK_TRACES_NOT_AVAILABLE') {
console.log(
'The current debug agent does not use Inspector async stack ' +
'traces. The above warning will not affect the debug agent.');

This comment was marked as spam.

This comment was marked as spam.

delete process.env.GCLOUD_PROJECT;
oldLog = console.log;

This comment was marked as spam.

Copy link
Contributor

@DominicKramer DominicKramer left a comment

Choose a reason for hiding this comment

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

LGTM with nits.

// TODO: Handle the case where debuglet.debuggee is undefined
assert.equal((debuglet.debuggee_ as Debuggee).project, projectId);
const arch = process.arch;
if (semver.satisfies(process.version, '>=8') &&

This comment was marked as spam.

@@ -24,7 +24,10 @@ export const messages = {
CAPTURE_BREAKPOINT_DATA: 'Error trying to capture snapshot data: ',
INVALID_LINE_NUMBER: 'Invalid snapshot position: ',
COULD_NOT_FIND_OUTPUT_FILE:
'Could not determine the output file associated with the transpiled input file'
'Could not determine the output file associated with the transpiled input file',
ASYNC_TRACES_WARNING: 'The Stackdriver debug agent does not use Inspector ' +

This comment was marked as spam.

This comment was marked as spam.


after(function() { process.env.GCLOUD_PROJECT = oldGP; });

beforeEach(function() {
beforeEach(() => {

This comment was marked as spam.

This comment was marked as spam.

delete process.env.GCLOUD_PROJECT;
nocks.oauth2();
});

afterEach(function() { nock.cleanAll(); });
afterEach(() => {

This comment was marked as spam.

This comment was marked as spam.

@gaofanmichael gaofanmichael merged commit 964cc31 into googleapis:master Oct 20, 2017
@gaofanmichael gaofanmichael deleted the warning branch October 20, 2017 18:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants