Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tizenbrew-app/TizenBrew/service-nextgen/service/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ module.exports.onStart = function () {
const inDebug = {
tizenDebug: false,
webDebug: false,
appDebug: false,
rwiDebug: false
};

Expand Down Expand Up @@ -197,6 +198,7 @@ module.exports.onStart = function () {

if (mdl.packageType === 'app') {
inDebug.webDebug = false;
inDebug.appDebug = false;
inDebug.tizenDebug = false;
} else {
currentModule.mainFile = mdl.mainFile;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ function startDebugging(port, queuedEvents, clientConn, ip, mdl, inDebug, appCon

inDebug.tizenDebug = false;
inDebug.webDebug = false;
inDebug.appDebug = false;
inDebug.rwiDebug = false;

mdl.fullName = '';
Expand Down Expand Up @@ -84,7 +85,10 @@ function startDebugging(port, queuedEvents, clientConn, ip, mdl, inDebug, appCon
}
}
}
if (!isAnotherApp) inDebug.webDebug = true;
if (!isAnotherApp) {
inDebug.webDebug = true;
inDebug.appDebug = true;
}
appControlData = null;
}).on('error', (err) => {
if (attempts >= 15) {
Expand Down Expand Up @@ -121,4 +125,4 @@ function sendClientInformation(clientConn, data) {
}, 500);
}

module.exports = startDebugging;
module.exports = startDebugging;
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const initialState = {
sharedData: {
debugStatus: {
rwiDebug: false,
webDebug: false,
appDebug: false,
tizenDebug: false
},
Expand Down Expand Up @@ -48,4 +49,4 @@ export function GlobalStateProvider({ children }) {
{children}
</GlobalStateContext.Provider>
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,21 @@ class Client {
}

case Events.GetDebugStatus: {
const normalizedPayload = {
rwiDebug: Boolean(payload && payload.rwiDebug),
webDebug: Boolean(payload && (payload.webDebug || payload.appDebug)),
appDebug: Boolean(payload && (payload.webDebug || payload.appDebug)),
tizenDebug: Boolean(payload && payload.tizenDebug)
};

const state = this.context.state;
state.sharedData.debugStatus = payload;
state.sharedData.debugStatus = normalizedPayload;
this.context.dispatch({
type: 'SET_SHARED_DATA',
payload: state.sharedData
});

if (!payload.rwiDebug && !payload.appDebug && !payload.tizenDebug) {
if (!normalizedPayload.rwiDebug && !normalizedPayload.webDebug && !normalizedPayload.tizenDebug) {
this.send({
type: Events.CanLaunchInDebug
});
Expand Down Expand Up @@ -178,6 +185,7 @@ class Client {
handleCanLaunchModules(payload) {
const debugStatus = this.context.state.sharedData.debugStatus;
debugStatus.webDebug = true;
debugStatus.appDebug = true;
this.context.dispatch({
type: 'SET_DEBUG_STATUS',
payload: debugStatus
Expand Down Expand Up @@ -243,4 +251,4 @@ class Client {
}

export { Events };
export default Client;
export default Client;