Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an automated way to generate a sequence diagram from an applications Javascript code?

I'm trying to find out if there's a way to generate a sequence diagram from our Javascript code.

Either something like that does not exist (yet), or I can't seem to find the good Google query. I always end up with js-sequence-diagram, which is a tool to generate sequence diagrams using Javascript, but not from Javascript code.

Firebugs profiling tool is able to tell you which Javascript methods were called how many times in 1 profiling session. It can also tell you the file in which the Javascript method resides. This kind of tells me it should be possible..

like image 462
TweeZz Avatar asked Nov 05 '13 11:11

TweeZz


People also ask

How do I generate code from sequence diagram?

Right click a Sequence Diagram and select Generate Code from Sequence diagram. To generate a Sequence Diagram containing code of an operation: 1. Click into the empty space of the Sequence Diagram, that contains code of an operation.

Which software is used for sequence diagram?

Lucidchart. Lucidchart is one of the highest-rated diagramming tools currently on the market. They offer a wide variety of diagram templates, a full shapes library, and impressive collaboration features.


1 Answers

I was thinking that profiling with with the Developer Tools (Chrome or whatever) might be the only way but then I saw the answers to this question: How can I reverse engineer my JavaScript files with js/uml?

"code2flow generates callgraphs"

I'll have to give it a try.

like image 172
peater Avatar answered Oct 05 '22 22:10

peater