DkmScriptDocument Class

Definition

Represents a document which is executing in a script runtime environment. For example, the Microsoft JavaScript engine.

public ref class DkmScriptDocument : Microsoft::VisualStudio::Debugger::Script::DkmScriptDocumentTreeNode
[System.Runtime.InteropServices.Guid("5df7092d-153e-3a9e-6a9c-01d70ae57148")]
public class DkmScriptDocument : Microsoft.VisualStudio.Debugger.Script.DkmScriptDocumentTreeNode
[<System.Runtime.InteropServices.Guid("5df7092d-153e-3a9e-6a9c-01d70ae57148")>]
type DkmScriptDocument = class
    inherit DkmScriptDocumentTreeNode
Public Class DkmScriptDocument
Inherits DkmScriptDocumentTreeNode
Inheritance
Inheritance
Attributes

Properties

ContentType

Indicates the content type of the underlying script document.

This API was introduced in Visual Studio 12 RTM (DkmApiVersion.VS12RTM).

EmbeddedDocumentKind

Indicates the kind of embedded document (or none if not an embedded document). The type can be eval code, function code, or script block.

This API was introduced in Visual Studio 12 RTM (DkmApiVersion.VS12RTM).

FilePath

[Optional] File path (ex: c:\myfolder\file.js) of the script document. This will be null if the document has no URL, or has a non-'file://' URL.

Flags

Flag properties of a script document.

IsUnloaded

Returns true if a 'unloaded' event has been raised for this object (example: DkmThread::Unload is called) or if the object has been closed. Note that care must be used when checking this status as, without synchronization, the returned status may no longer be accurate the instruction after it is read.

(Inherited from DkmDataContainer)
JmcState

The Just-My-Code state of the document. To update the value of this variable, call DkmScriptDocument.SetJmcState.

This API was introduced in Visual Studio 12 RTM (DkmApiVersion.VS12RTM).

Module

The symbol container which owns this document.

Parent

[Optional] Parent in the script document tree. This will be null for the root application container.

(Inherited from DkmScriptDocumentTreeNode)
Process

DkmProcess represents a target process which is being debugged. The debugger debugs processes, so this is the basic unit of debugging. A DkmProcess can represent a system process or a virtual process such as minidumps.

(Inherited from DkmScriptDocumentTreeNode)
RuntimeInstance

The runtime which produced this container.

(Inherited from DkmScriptDocumentTreeNode)
SourceProjectItem

[Optional] The project item which matches this document.

Title

Title of the node.

(Inherited from DkmScriptDocumentTreeNode)
UniqueId

Guid which uniquely identifies this script document folder object.

Url

[Optional] URL of the script document. This may be null if the document has no URL.

Methods

Create(DkmRuntimeInstance, DkmScriptDocumentTreeNode, String, DkmModule, String, String, DkmScriptDocumentFlags, DkmScriptDocumentContentType, DkmScriptEmbeddedDocumentKind, DkmScriptSourceProjectItem, DkmScriptDocumentJmcState, DkmDataItem)

Create a new DkmScriptDocument object instance.

This method will send a ScriptDocumentTreeNodeCreate event.

Location constraint: API must be called from a Monitor component (component level < 100,000).

This API was introduced in Visual Studio 12 RTM (DkmApiVersion.VS12RTM).

Create(DkmRuntimeInstance, DkmScriptDocumentTreeNode, String, DkmModule, String, String, DkmScriptDocumentFlags, DkmScriptSourceProjectItem, DkmDataItem)

Create a new DkmScriptDocument object instance.

This method will send a ScriptDocumentTreeNodeCreate event.

Location constraint: API must be called from a Monitor component (component level < 100,000).

GetContent(Boolean, UInt32[])

Provides the current content of the specified document object.

GetDataItem<T>()

Gets the instance of 'T' which has been added to this container instance. If this container does not contain a 'T', this function will return null.

(Inherited from DkmDataContainer)
GetProjectItemScriptBlocks()

Queries the language service (IVsLanguageDebugInfoScript) to obtain script block information from the associated project item of the specified script document.

Location constraint: API must be called from an IDE component (component level > 100,000).

OnContentInsert(DkmTextSpan, String)

Raises a ScriptDocumentContentInsert event. The script document provider will only raise this event if events have been enabled for this document.

This method may only be called by the component which created the object.

OnContentRemove(DkmTextSpan, Int32)

Raises a ScriptDocumentContentRemove event. The script document provider will only raise this event if events have been enabled for this document.

This method may only be called by the component which created the object.

RemoveDataItem<T>()

Remove the instance of 'T' from this container. It is usually unnecessary to call this method as a data container will automatically be emptied when the object is closed.

(Inherited from DkmDataContainer)
SetDataItem<T>(DkmDataCreationDisposition, T)

Place a new item in the data container.

(Inherited from DkmDataContainer)
SetJmcState(DkmScriptDocumentJmcState)

Sets the JMC state for the script document. If the value is "Unsure", the script debug monitor can make its own determination of the JMC state or ask a project system for the JMC state.

This API was introduced in Visual Studio 12 RTM (DkmApiVersion.VS12RTM).

SetRaiseContentEvents(Boolean)

Enables or disables raising events when the content of the document is changed. By default, documents do not generate content events. So this method should be called by any component that wishes to receive content events. The script document manager maintains a count of the number of calls to enable content events, and will raise events whenever this count is greater than 0. Callers should take care to ensure that SetRaiseContentEvents(false) is called ONLY after a successful call to SetRaiseContentEvents(true). Content events are automatically disabled when the document is unloaded.

SetRaiseSymbolEvents(Boolean)

Enables or disables raising ScriptSymbolsUpdated when symbols in the document are changed. By default, documents do not generate symbol events. So this method should be called by any component that wishes to receive symbol events. The script document manager maintains a count of the number of calls to enable symbol events, and will raise events whenever this count is greater than 0. Callers should take care to ensure that SetRaiseSymbolEvents(false) is called ONLY after a successful call to SetRaiseSymbolEvents(true). Symbol events are automatically disabled when the document is unloaded.

SetRaiseSymbolEvents(DkmWorkList, Boolean, DkmCompletionRoutine<DkmSetRaiseSymbolEventsAsyncResult>)

Enables or disables raising ScriptSymbolsUpdated when symbols in the document are changed. By default, documents do not generate symbol events. So this method should be called by any component that wishes to receive symbol events. The script document manager maintains a count of the number of calls to enable symbol events, and will raise events whenever this count is greater than 0. Callers should take care to ensure that SetRaiseSymbolEvents(false) is called ONLY after a successful call to SetRaiseSymbolEvents(true). Symbol events are automatically disabled when the document is unloaded.

This method will append a new work item to the specified work list, and return once the work item has been appended. The actual processing of the work item is asynchronous. The caller will be notified that the request is complete through the completion routine.

TryResolve(DkmSourceFileId)

This method is called when a script document is created or when the project item path is set to try and bind breakpoints against the given script document.

Location constraint: API must be called from an IDE component (component level > 100,000).

Unload()

Invoked by a script document provide to fire a ScriptDocumentTreeNodeUnload event.

This method may only be called by the component which created the object.

(Inherited from DkmScriptDocumentTreeNode)

Applies to