我部署的JavaScript应用程序引发了异常.Javascript代码被混淆了.我想知道,原始源代码中的哪一行引发了异常.未部署源地图,因此Chrome Devtools无法连接它们.我可能在我的localhost上有源映射.
所以基本上我想从我的机器添加源映射到浏览器,以便知道出现异常的行号.
我试着Add Folder to Workspace和Map to File System Resource.它没有帮助.在浏览器的控制台中可以看到异常,但它仍然指向混淆的javascript源,并且无法检测到所需的行号.
我可能做错了什么.任何帮助表示赞赏(包括额外的扩展或其他浏览器使用).
javascript remote-debugging google-chrome-devtools source-maps
我正在尝试设置一个包含三列的flexbox布局.左列和右列具有固定的宽度.中间列具有流体宽度以填充可用空间,但它包含一个长文本,不应该包装,而是使用省略号.
遗憾的是,非包装文本不能提供列占用可用空间的能力,并将整个布局推送到父元素的边界之外.
img {
max-width: 100%;
}
#container {
display: flex;
max-width: 900px;
}
.column.left {
width: 350px;
flex: 0 0 350px;
}
.column.right {
width: 350px;
flex: 0 0 350px;
}
.column.center {
// fluid width required
}
h1 {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}Run Code Online (Sandbox Code Playgroud)
<div id="container">
<div class="column left">
<img src="https://placeholdit.imgix.net/~text?txtsize=33&txt=350%C3%97150&w=350&h=150" alt="">
</div>
<div class="column center">
<h1>
This is long text. If overflow use ellipsis
</h1>
</div>
<div class="column right">
<img src="https://placeholdit.imgix.net/~text?txtsize=33&txt=350%C3%97150&w=350&h=150" alt="">
</div>
</div>Run Code Online (Sandbox Code Playgroud)
链接到小提琴: …
我在 Mac 上使用 Elastic Search 1.7.1。
这是我的索引映射:
{
"settings":{
"analysis":{
"filter":{
"my_edgengram":{
"max_gram":15,
"token_chars":[
"letter",
"digit"
],
"type":"edgeNGram",
"min_gram":1
},
},
"analyzer":{
"stop_edgengram_analyzer":{
"filter":[
"lowercase",
"asciifolding",
"stop",
"my_edgengram"
],
"type":"custom",
"tokenizer":"whitespace"
}
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
调试分析器:
$ curl -XGET 'http://localhost:9200/objects/_analyze?analyzer=stop_edgengram_analyzer&text=America,s&pretty=True'
{
"tokens" : [
... skipped ...
, {
"token" : "america",
"start_offset" : 0,
"end_offset" : 9,
"type" : "word",
"position" : 1
}, {
"token" : "america,",
"start_offset" : 0,
"end_offset" : 9,
"type" : "word",
"position" …Run Code Online (Sandbox Code Playgroud) analyzer ×1
css ×1
css3 ×1
flexbox ×1
html ×1
javascript ×1
n-gram ×1
nowrap ×1
source-maps ×1
tokenize ×1