FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
vscode-java-debug/src/javaLogger.ts at main · microsoft/vscode-java-debug · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
microsoft
/
vscode-java-debug
Public
Notifications
You must be signed in to change notification settings
Fork
428
Star
588
Code
Issues
201
Pull requests
12
Discussions
Actions
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
vscode-java-debug
/
src
/
javaLogger.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
37 lines (33 loc) · 1.53 KB
Breadcrumbs
vscode-java-debug
/
src
/
javaLogger.ts
Copy path
File metadata and controls
37 lines (33 loc) · 1.53 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
import
{
sendInfo
,
sendOperationError
}
from
"vscode-extension-telemetry-wrapper"
;
export
enum
Type
{
EXCEPTION
=
"exception"
,
USAGEDATA
=
"usageData"
,
USAGEERROR
=
"usageError"
,
ACTIVATEEXTENSION
=
"activateExtension"
,
// TODO: Activation belongs to usage data, remove this category.
}
export
function
logJavaException
(
errorProperties
:
any
)
:
void
{
/**
* A sample errorProperties from Java code.
* {
* "description": "Failed to attach to remote debuggee VM. Reason: java.net.ConnectException: Connection refused: connect",
* "message": "Failed to attach to remote debuggee VM. Reason: java.net.ConnectException: Connection refused: connect",
* "stackTrace": "[{\"declaringClass\":\"com.microsoft.java.debug.core.adapter.AdapterUtils\", ...]",
* "debugSessionid": "5680f12b-5b5f-4ac0-bda3-d1dbc3c12c10",
* }
*/
const
{
debugSessionId
,
description
,
message
,
stackTrace
}
=
errorProperties
;
sendOperationError
(
debugSessionId
,
"debugSession"
,
{
name
:
"JavaException"
,
message
:
description
||
message
,
stack
:
stackTrace
,
}
)
;
}
export
function
logJavaInfo
(
commonProperties
:
any
,
measureProperties
?:
any
)
:
void
{
if
(
measureProperties
&&
measureProperties
.
duration
!==
undefined
)
{
sendInfo
(
commonProperties
.
debugSessionId
,
commonProperties
,
measureProperties
)
;
}
else
{
sendInfo
(
commonProperties
.
debugSessionId
,
commonProperties
)
;
}
}
Back
|
FazBrowse Home
|
New Git URL